Commit Graph

810 Commits

Author SHA1 Message Date
Dylan K. Taylor
7f0d0c9d63 Revert "fixed negative effect durations when level tick rate is > 1"
This reverts commit 3614711a02.
2017-12-23 10:44:21 +00:00
Dylan K. Taylor
4f8e4f0522 Add EOF newlines where missing (bulk) (#1836)
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
Dylan K. Taylor
953f45c50f Altered armour handling, now works for damage other than PvP 2017-12-14 12:37:28 +00:00
Dylan K. Taylor
1822abc862 Living: Apply absorption after effect damage reduction is checked 2017-12-14 12:03:12 +00:00
Dylan K. Taylor
92e966686e Refactor Living->attack() into several methods 2017-12-14 11:39:05 +00:00
Dylan K. Taylor
e75fbd7fb4 Changed Effect colours to use Color objects instead of arrays (#1814) 2017-12-14 10:21:07 +00:00
Dylan K. Taylor
06f605879a Effect: Save and restore ambiency properly 2017-12-14 10:10:26 +00:00
Dylan K. Taylor
4c7038f941 Effect: Added proper documentation on "ambiency" 2017-12-14 09:57:20 +00:00
Dylan K. Taylor
f5ebfc3418 Effect: Added Fatal Poison effect
This is identical to normal Poison, except that it kills the victim. Parrots receive this effect when they are fed cookies.
2017-12-13 18:59:49 +00:00
Dylan K. Taylor
dfc2d1dfe6 Stop hardcoding src/pocketmine/resources everywhere 2017-12-11 19:52:49 +00:00
Dylan K. Taylor
8a90d159fe Cleanup unused imports 2017-12-10 12:09:46 +00:00
Dylan K. Taylor
bf4076766e Living: Fixed passing FloatTag to setHealth() when HealF tag is present, close #1784 2017-12-09 20:31:14 +00:00
Dylan K. Taylor
49dbd8b2c8 Living: Remove superfluous fire resistance check from dealFireDamage()
This is already checked in Living->attack(). It's preferable to allow it to be cancelled there since plugins can then un-cancel EntityDamageEvent to bypass the effect.
2017-12-07 17:32:50 +00:00
Dylan K. Taylor
502dd14c67 Entity: Remove excess whitespace in doOnFireTick() 2017-12-07 17:28:37 +00:00
Dylan K. Taylor
74239eec69 Living: Remove nonsensical >0 condition on boolean
Maybe this once returned integers, but it doesn't anymore.
2017-12-07 16:49:16 +00:00
Dylan K. Taylor
3c936e1be8 Entity: removed dead maxFireTicks property 2017-12-07 16:37:32 +00:00
Dylan K. Taylor
16fd37a039 Entity: Add getter & setter for fireTicks 2017-12-07 16:37:01 +00:00
Dylan K. Taylor
b06ca6eb0b Rename Living->callDeathEvent() to Living->onDeath() 2017-12-07 12:26:49 +00:00
Dylan K. Taylor
5a0afa9f88 Fixed broken logic in EntityEffectEvents, close #1767 (#1768) 2017-12-03 16:14:20 +00:00
Muqsit
92a1f45175 Make Living::addEffect() return bool (#1755) 2017-12-01 16:56:37 +00:00
Dylan K. Taylor
0badaeb8f4 bump max dead ticks to 25 so death smoke cloud works properly
I wish this wasn't client sided... it's a pain to get it synced properly.
2017-11-22 19:55:25 +00:00
Dylan K. Taylor
c5ac6a7606 Remove redundant count() for effects ticking 2017-11-22 19:44:22 +00:00
Dylan K. Taylor
e9951b1b1f Remove redundant condition for setBreathing() 2017-11-22 19:43:09 +00:00
Dylan K. Taylor
47f94eebd1 Use maxDeadTicks instead of hardcoded 20 2017-11-22 18:58:58 +00:00
Dylan K. Taylor
e9e22db1e7 Cleaned up death animation handling, removed dead ticking from non-Living entities 2017-11-22 17:17:47 +00:00
JackNoordhuis
686e1c4470 Implement ender chest (#1462) 2017-11-22 14:25:21 +00:00
Dylan K. Taylor
74b074753f Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
Dylan K. Taylor
a8ad956b29 Fixed keepMovement logic 2017-11-19 19:28:04 +00:00
DaPigGuy
96348e0e44 Fix setMaxAirSupplyTicks() (#1555) 2017-11-19 01:40:46 +00:00
Dylan K. Taylor
db8a835a64 add a default value for Entity->setCanClimb() 2017-11-17 12:19:04 +00:00
Dylan K. Taylor
460d540dbc Further cleanup on ListTag and CompoundTag usage 2017-11-17 11:43:32 +00:00
Dylan K. Taylor
665130561e Further cleanup on NBT dynamic field access
not sure how I missed so many of these... there are probably lots more besides :(
2017-11-17 11:19:36 +00:00
Dylan K. Taylor
3a16985d45 Cleaned up item & arrow pickup code 2017-11-15 12:14:42 +00:00
Dylan K. Taylor
aa399a1109 migrate to new CompoundTag API (#1515) 2017-11-10 15:38:21 +00:00
Dylan K. Taylor
d4494687d1 Fixed collision blocks not being recalculated after teleporting, close #1531 2017-11-09 15:11:42 +00:00
Dylan K. Taylor
0e64c3dad8 fixed misusing isAlive(), close #1523 2017-11-07 09:32:38 +00:00
Dylan K. Taylor
eab7b93483 Fixed misuse of kill() and close() when deleting entities (#1490) 2017-11-04 19:30:48 +00:00
Dylan K. Taylor
a66a757f56 Cleaned up EntityEventPacket handling 2017-11-04 18:31:35 +00:00
Dylan K. Taylor
3614711a02 fixed negative effect durations when level tick rate is > 1
thank you @Sandertv
2017-11-01 09:09:17 +00:00
Dylan K. Taylor
991d321928 improved geometry debloating, also apply on skin changes 2017-10-29 12:14:16 +00:00
Dylan K. Taylor
600d80331a Accept null for targets in Human->sendSkin()
For humans, it'll send to all viewers. For players, it'll send to all viewers, and the player itself.
2017-10-29 11:18:34 +00:00
Dylan K. Taylor
bddd7e0eee Fixed no fall damage when falling 3-4 blocks, close #891 2017-10-26 23:23:08 +01:00
Dylan K. Taylor
d48880e31b Remove redundant assert 2017-10-24 17:40:22 +01:00
Matt
13e5718463 Using BlockFactory instead of Block 2017-10-23 18:50:37 +01:00
Matt
270e0c076c Fixed items not removed when put in the lava 2017-10-23 18:50:37 +01:00
Dylan K. Taylor
8daa8deae9 Added Living->lookAt() 2017-10-23 17:29:20 +01:00
Dylan K. Taylor
3ed8855894 fix drop chance of rotten flesh 2017-10-23 12:35:57 +01:00
Dylan K. Taylor
f25255e46c fix zombie drops 2017-10-23 12:24:34 +01:00
Dylan K. Taylor
7db8345424 Added rough support for reading entity saves with multiple save IDs (for PC 1.11 compatibility)
this will still always save using the legacy format to remain compatible with PC < 1.11.

TODO: entirely separate entity NBT format from entity implementation for proper multi-format compatibility
2017-10-22 10:16:24 +01:00
Dylan K. Taylor
1dd2203ee5 Fixed burning mobs not getting onfire data flag set when read from disk
they'd just flash red and take damage for no apparent reason
2017-10-21 12:36:30 +01:00