Dylan K. Taylor
8ccd13319c
LevelSoundEventPacket: update constants
...
now with whitespace gaps generated because apparently some are missing... ugh!
2018-05-25 17:27:31 +01:00
Dylan K. Taylor
c513d355cb
Updated Snooze dependency
2018-05-25 13:52:12 +01:00
Dylan K. Taylor
02b53785be
Entity: added some new ID constants
2018-05-24 12:39:44 +01:00
Dylan K. Taylor
9dd0ee7f05
Entity: replaced motion and lastMotion fields with vectors
2018-05-24 12:11:41 +01:00
Dylan K. Taylor
595f1f58da
Living: added knockback resistance attribute checks
2018-05-24 11:49:18 +01:00
Dylan K. Taylor
509e8c5f6d
ItemFactory: register some easy items
...
these are items that do nothing and/or are only used for crafting. As such they are simple to add.
Others will be added later on, but others require extra work and/or reverse engineering which I don't have time for now.
2018-05-23 19:48:30 +01:00
Dylan K. Taylor
263cd900a8
Enchantment: update item type flags
2018-05-23 17:39:52 +01:00
Dylan K. Taylor
164ce76ff5
Enchantment: apply typehints to PHP 7.2 standards
2018-05-23 17:28:40 +01:00
Dylan K. Taylor
fbf760bafe
Enchantment: implemented Vanishing
2018-05-23 17:23:56 +01:00
Dylan K. Taylor
2c1afe5f2c
ItemFactory: generate some TODOs
2018-05-23 13:42:19 +01:00
Dylan K. Taylor
b109b457dc
Item: added some new constants
2018-05-23 13:35:15 +01:00
Dylan K. Taylor
e12e2897bb
Enchantment: Add new constants
...
these aren't registered yet because they aren't implemented.
2018-05-23 12:34:58 +01:00
Dylan K. Taylor
8f41384923
Item: remove workaround for anvils
...
they removed this in the 1.2.13 release. now the metadata matches the block.
2018-05-23 11:43:55 +01:00
Dylan K. Taylor
acf29711c2
Implemented Totems, close #2198
...
Totem usage can be detected using the MODIFIER_TOTEM constant of EntityDamageEvent.
This does not currently support using the totem in the offhand because offhand is not implemented yet.
2018-05-23 10:06:35 +01:00
Dylan K. Taylor
1c4dd4f280
Player: broadcast entity event to self as well when sending to all viewers
...
this fixes several bugs with entity events and removes the need for a hit animation hack.
2018-05-23 09:28:46 +01:00
Dylan K. Taylor
faa88a55e4
EntityDamageEvent: break API
...
The general purpose of this is to split up base damage from modifiers.
- Added methods getBaseDamage(), setBaseDamage(), getOriginalBaseDamage(), getModifiers(), getOriginalModifiers()
- setDamage() renamed to setModifier() and type is now mandatory
- getDamage() renamed to getModifier() and type is now mandatory
- getOriginalDamage() renamed to getOriginalModifier() and type is now mandatory
- Removed MODIFIER_BASE constant
- Constructors now accept: float baseDamage, float[] modifiers instead of just float[] modifiers
2018-05-22 19:05:25 +01:00
Dylan K. Taylor
c9ed517063
Merge branch 'release/alpha12'
2018-05-22 18:50:24 +01:00
Dylan K. Taylor
28b0f5f86a
UpdateBlockSyncedPacket: rename field
2018-05-22 18:49:41 +01:00
Dylan K. Taylor
e87e2d4e52
UpdateBlockSyncedPacket: fix field visibility
2018-05-22 18:49:41 +01:00
Dylan K. Taylor
86c27953ec
NetworkBinaryStream: bail on unknown entity data types
2018-05-22 16:44:03 +01:00
SOFe
5552704922
PluginBase->getResources() should only return files
...
Directories should not be returned. Previously it even returns resources\.. according to my test on Windows.
2018-05-21 17:25:57 +08:00
SOFe
c7ac5dfd4b
Fixed the doc comment in Plugin::getResources()
...
It returns SplFileInfo[] not string[]
2018-05-21 17:24:12 +08:00
Dylan K. Taylor
bd9b59f401
Contributing: be more clear about committing on GitHub
2018-05-21 09:59:56 +01:00
SalmonDE
2f03f5f6d5
Fix a grammar error in Player ( #2197 )
2018-05-20 21:27:40 +01:00
Dylan K. Taylor
f4a26ddfd9
update Composer dependencies to get Snooze asserts
...
warning: there are bugs in this code! this will crash and burn without warning!!!!!
2018-05-20 12:57:23 +01:00
Dylan K. Taylor
adb9390b53
Entity: Rename isInsideOfWater() to isUnderwater()
2018-05-19 18:10:43 +01:00
Dylan K. Taylor
6111ce7df1
Human: don't hardcode max food
2018-05-19 16:48:21 +01:00
Dylan K. Taylor
1f73c08762
Human: fix possible bug with food ticking
...
it updates it but doesn't take note of the updated value, which could cause the code below to be erroneously triggered.
2018-05-19 16:47:04 +01:00
Dylan K. Taylor
2900167ffa
Human: removed redundant isSprinting() check from doFoodTick()
...
this is checked in setSprinting() anyway.
2018-05-19 16:33:13 +01:00
Dylan K. Taylor
11cc9f19ad
Human: replace hardcoded difficulty values with constants in doFoodTick()
2018-05-19 16:32:30 +01:00
Dylan K. Taylor
807af2e6fb
Human: change doFoodTick() visibility to protected
2018-05-19 16:30:41 +01:00
Dylan K. Taylor
f2511983cf
Level: use increment operation for updating time
2018-05-19 16:05:08 +01:00
Dylan K. Taylor
bac649137b
Level: fixed doc comment for getSafeSpawn()
2018-05-19 14:02:54 +01:00
Dylan K. Taylor
71224f51d5
Level: cleaned up some nonsensical code in getSafeSpawn()
...
it's impossible for this function to return false because $spawn is guaranteed to be a Vector3 when it's checked in instanceof.
2018-05-19 13:18:20 +01:00
Dylan K. Taylor
6c3fc4af46
Level: switch order of addEntity() and removeEntity()
...
now it's consistent with addTile() and removeTile()
2018-05-19 13:14:11 +01:00
Dylan K. Taylor
75d13be38e
EnderChestInventory: remove unused import
2018-05-19 11:37:22 +01:00
Dylan K. Taylor
9bc860f7a8
LevelDB: fixup extra-data handling, don't delete it - just don't read it
...
we'll need this once multi-layer block storages are implemented.
2018-05-19 11:35:54 +01:00
Dylan K. Taylor
66963fbf9a
Nuke block extradata
...
this has been superseded by multi-layer blockstorages in 1.2.14+
2018-05-19 11:03:28 +01:00
Dylan K. Taylor
172c6420c1
Server: add type documentation for fields
...
found a few bugs in the process too
2018-05-19 10:55:34 +01:00
Dylan K. Taylor
e7fc9227bc
Server: fixed bug in alwaysTickPlayers config
2018-05-19 10:53:31 +01:00
Dylan K. Taylor
13cd0cdcfd
Server: cast result of getProperty() for networkCompressionAsync
2018-05-19 10:52:09 +01:00
Dylan K. Taylor
0bb5e88b5c
Hinting up Entity API to PHP 7.2 standards
2018-05-19 10:46:47 +01:00
Dylan K. Taylor
389990e0a8
Entity: remove useless functions
...
these may be TODOs but I have no idea why or where they need to be implemented, so until they do they are useless clutter.
2018-05-18 20:09:55 +01:00
Dylan K. Taylor
067aad9546
PocketMine.php: Remove unused \pocketmine\ANSI constant
...
Terminal::hasFormattingCodes() should be used instead (this is also portable across threads even if constants aren't inherited by child threads, provided that the child thread has an autoloader available.
2018-05-18 18:51:18 +01:00
Dylan K. Taylor
b1a7606e82
PocketMine.php: Take dependency versions for granted
...
Since this is managed by Composer now, it's expected that users should install dependencies appropriately when running from source code. We have a few more dependencies than just RakLib and SPL which are version-critical which are not checked here, and I don't have the taste for adding more version checks here.
A better way would be to automatically detect outdated Composer autoloader and warn that dependencies might need updating, but I'm not sure how to do that off the hop. Users should prefer using prebuilt phars anyway - only developers and/or people who know what they are doing should be running the server from source code.
2018-05-18 18:47:12 +01:00
Dylan K. Taylor
febba6e3a6
Tile: call parent constructor instead of duping code
2018-05-18 16:49:14 +01:00
Dylan K. Taylor
d8dc89e7c8
EnderChestInventory: Removed unnecessary owner parameter
2018-05-18 16:46:48 +01:00
Dylan K. Taylor
b75413e3c4
CommandReader: Use stream_isatty() instead of posix_isatty() (new in 7.2)
2018-05-18 16:46:48 +01:00
Dylan K. Taylor
f08537a1e0
BlockMetadataStore: fix case of import
...
found by PHPStan static analysis tool
2018-05-18 16:46:48 +01:00
Dylan K. Taylor
6643fa5f09
README: it's not Pocket Edition anymore
2018-05-18 14:54:50 +01:00