bf4076766e
Living: Fixed passing FloatTag to setHealth() when HealF tag is present, close #1784
2017-12-09 20:31:14 +00:00
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
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
b06ca6eb0b
Rename Living->callDeathEvent() to Living->onDeath()
2017-12-07 12:26:49 +00:00
5a0afa9f88
Fixed broken logic in EntityEffectEvents, close #1767 ( #1768 )
2017-12-03 16:14:20 +00:00
92a1f45175
Make Living::addEffect() return bool ( #1755 )
2017-12-01 16:56:37 +00:00
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
c5ac6a7606
Remove redundant count() for effects ticking
2017-11-22 19:44:22 +00:00
e9951b1b1f
Remove redundant condition for setBreathing()
2017-11-22 19:43:09 +00:00
47f94eebd1
Use maxDeadTicks instead of hardcoded 20
2017-11-22 18:58:58 +00:00
e9e22db1e7
Cleaned up death animation handling, removed dead ticking from non-Living entities
2017-11-22 17:17:47 +00:00
96348e0e44
Fix setMaxAirSupplyTicks() ( #1555 )
2017-11-19 01:40:46 +00:00
460d540dbc
Further cleanup on ListTag and CompoundTag usage
2017-11-17 11:43:32 +00:00
aa399a1109
migrate to new CompoundTag API ( #1515 )
2017-11-10 15:38:21 +00:00
a66a757f56
Cleaned up EntityEventPacket handling
2017-11-04 18:31:35 +00:00
3614711a02
fixed negative effect durations when level tick rate is > 1
...
thank you @Sandertv
2017-11-01 09:09:17 +00:00
bddd7e0eee
Fixed no fall damage when falling 3-4 blocks, close #891
2017-10-26 23:23:08 +01:00
8daa8deae9
Added Living->lookAt()
2017-10-23 17:29:20 +01:00
a245615531
fixed non-living entities lingering for a second after being kill()ed
...
only living entities should have death animation time
2017-10-19 20:51:50 +01:00
2601e35990
Cleaned up and added API for entity air supply, fixed oxygen being used in creative/spectator
...
this commit also includes respiration checks because it's cherry-picked
from api3/blocks, but respiration won't work until it's registered.
2017-10-09 11:28:40 +01:00
38fad4b963
Implement difficulty per-world ( #878 )
...
* Moved Server::getDifficultyFromString() to Level
* Added ability to set difficulty in worlds section of pocketmine.yml for generation
2017-09-26 11:16:51 +01:00
cb7911ee9c
Improved Absorption, now only applies to living entities, now controllable by plugins
2017-09-03 12:37:34 +01:00
21f09d5fdb
Cleaned up Effect handling and replacement
2017-08-30 12:53:41 +01:00
fd52022065
Refactor of health int -> float and fixed armor being useless when
...
computed damage reduction is less than 1
2017-08-30 11:03:07 +01:00
456ddd3fb3
Removed obsolete parameters from Entity->attack() and Entity->heal()
2017-08-21 13:25:11 +01:00
e825ebd8fa
Added some wrapper methods to make data flags less of a pain in the ass to work with
2017-08-17 16:52:17 +01:00
741394dab1
Typehinted up entity API
...
Did you guys think ALPHA7 changes were done?!
Sone stuff still needs some work, most notably data-properties can't be typed yet because they are just mushed into a couple of methods.
2017-08-16 19:04:30 +01:00
2d8395f70e
Absorption should be a float. Fixed #1071
2017-08-07 16:09:10 +01:00
6b5c0af161
Separation of effect handling from Entity, fixes #886
2017-08-07 16:03:54 +01:00
c3b8be3f60
and more typehints
2017-07-14 10:56:51 +01:00
394f420059
Fixed chunks not loading when respawning and some minor spawn sequence cleanup ( #1153 )
...
* Fixed chunks not loading when respawning and some minor spawn sequence cleanup
* This causes too much unexpected behaviour to be useful
Revert "Make use of Mojang's pitch hack, close #821 "
This reverts commit c2dfef700f
.
* Removed delayed-teleport system and cleaned up movement reset for dead players
* Fixed health resetting to max when quitting and rejoining
2017-07-05 10:31:16 +01:00
a365c831a8
Fixed some doc problems
2017-06-25 12:07:28 +01:00
eac756470a
Fixed trying to save health as a ShortTag, close #1039
2017-06-09 09:11:02 +01:00
890f72dbf2
Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs
2017-06-08 19:17:52 +01:00
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
54453d0b0a
Refactored entity IDs in packets for consistency and to clarify on types
2017-06-05 15:41:27 +01:00
8a7259aa73
Merge #826 : use getEffectLevel() instead of getAmplifier() + 1
...
Closes #412
2017-05-05 19:01:04 +08:00
6ece57e23e
Merge changes from master
2017-04-21 22:48:18 +01:00
2204942338
Fixed the half-done hunger implementation, fixed lots of bugs related to hunger
...
- Fixed starvation doesn't deal any damage at all (Human->getFood() returns a float, not an int, === 0 won't work so great)
- Added exhaustion for sprinting, walking, jumping and sprint-jumping as per MCPE (these use MCPE values, and yes MCPE does walking exhaustion!)
- Fixed attributes don't get reset after player death
- Added food and hunger regeneration in peaceful difficulty
- Added API methods Living->jump() (motion isn't updated yet, so this won't actually do much if plugins try to use it) and Living->getJumpVelocity()
TODO: implement exhaustion for swimming
2017-04-21 19:48:25 +01:00
e7406ba096
Fixed squid health attribute errors
2017-04-21 14:42:19 +01:00
1c7773c5f1
Visibility keyword before final or abstract keyword. ( #814 )
2017-04-13 20:58:53 +08:00
940b20c191
Implemented Absorption effect
...
This is a little buggy due to a client-sided bug. https://bugs.mojang.com/browse/MCPE-20520
TODO: add attribute save/restore
2017-03-21 13:23:57 +00:00
ab1150382a
Merge branch 'api3/network' into api3/network_mcpe-1.0.5
2017-03-18 16:30:06 +00:00
8114ceaf68
Merge branch 'master' into api3/network
2017-03-18 16:29:38 +00:00
92193fd27b
Use entity IDs in EntityDamageBy*EntityEvents, fixed memory leaks related to PvP/PvE/PvM ( #418 )
2017-03-13 10:30:31 +00:00
955dc38be4
Fixed botch-job implementation of Health Boost, will now actually work and not crash the server
2017-03-12 20:06:39 +00:00
56990eb28b
MCPE protocol gets its own namespace
2017-03-08 20:28:39 +00:00
598e7aac8f
More PhpStorm inspections, import cleanup
2017-01-04 14:55:11 +00:00
0bd7ea211d
Refactored Server::broadcastPacket() to be non-static
...
Why the hell was this static at all? Seriously Shoghi?
2017-01-03 22:24:40 +00:00
bfc77a772a
New entity data flags
...
@Intyre, you are beyond awesome
2016-10-27 10:55:05 +01:00