104 Commits

Author SHA1 Message Date
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
bddd7e0eee Fixed no fall damage when falling 3-4 blocks, close #891 2017-10-26 23:23:08 +01:00
Dylan K. Taylor
8daa8deae9 Added Living->lookAt() 2017-10-23 17:29:20 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
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
Dylan K. Taylor
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
Dylan K. Taylor
cb7911ee9c Improved Absorption, now only applies to living entities, now controllable by plugins 2017-09-03 12:37:34 +01:00
Dylan K. Taylor
21f09d5fdb Cleaned up Effect handling and replacement 2017-08-30 12:53:41 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
456ddd3fb3 Removed obsolete parameters from Entity->attack() and Entity->heal() 2017-08-21 13:25:11 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
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
Dylan K. Taylor
2d8395f70e Absorption should be a float. Fixed #1071 2017-08-07 16:09:10 +01:00
Dylan K. Taylor
6b5c0af161 Separation of effect handling from Entity, fixes #886 2017-08-07 16:03:54 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
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 c2dfef700feaf7235ece2fc140e93d02ae3f4af4.

* 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
Dylan K. Taylor
a365c831a8 Fixed some doc problems 2017-06-25 12:07:28 +01:00
Dylan K. Taylor
eac756470a Fixed trying to save health as a ShortTag, close #1039 2017-06-09 09:11:02 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
54453d0b0a Refactored entity IDs in packets for consistency and to clarify on types 2017-06-05 15:41:27 +01:00
smarticles101
8a7259aa73
Merge #826: use getEffectLevel() instead of getAmplifier() + 1
Closes #412
2017-05-05 19:01:04 +08:00
Dylan K. Taylor
6ece57e23e Merge changes from master 2017-04-21 22:48:18 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
e7406ba096 Fixed squid health attribute errors 2017-04-21 14:42:19 +01:00
Sandertv
1c7773c5f1 Visibility keyword before final or abstract keyword. (#814) 2017-04-13 20:58:53 +08:00
Dylan K. Taylor
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
Dylan K. Taylor
ab1150382a Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-18 16:30:06 +00:00
Dylan K. Taylor
8114ceaf68 Merge branch 'master' into api3/network 2017-03-18 16:29:38 +00:00
Dylan K. Taylor
92193fd27b Use entity IDs in EntityDamageBy*EntityEvents, fixed memory leaks related to PvP/PvE/PvM (#418) 2017-03-13 10:30:31 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00
Dylan K. Taylor
598e7aac8f More PhpStorm inspections, import cleanup 2017-01-04 14:55:11 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
bfc77a772a New entity data flags
@Intyre, you are beyond awesome
2016-10-27 10:55:05 +01:00
Dylan K. Taylor
2ffbb452bb Fix a bunch of metadata bugs, fixed air ticking and added some new API methods 2016-10-27 10:55:04 +01:00
Dylan K. Taylor
787f6594b2 More new data properties 2016-10-27 10:55:04 +01:00
PEMapModder
5459576833 Added hunger and experience saving 2016-02-17 19:56:19 +08:00
PEMapModder
8807617480 Fixed attriutes not sending 2016-02-11 18:45:58 +08:00
PEMapModder
329a525ea1 Implemented food and hunger 2016-02-10 22:49:48 +08:00
Shoghi Cervantes
7f8b39a63c Renamed NBT tags to have Tag in the name 2015-08-23 00:25:29 +02:00
Shoghi Cervantes
31ef7721b1 Removed network channels, bumped protocol 2015-08-12 14:59:48 +02:00
Shoghi Cervantes
3e2cce3c2c use cleanup 2015-08-07 21:26:24 +02:00
Shoghi Cervantes
2eaa12005e Changed knockback process 2015-06-08 15:52:57 +02:00
Shoghi Cervantes
9a2170d296 protocol 27, added player spawn events after death from new protocol, added EntityEvent constants 2015-05-28 14:19:00 +02:00
Shoghi Cervantes
44b5c23ee1 Fixed dead entities and Item picking, improved timing reports 2015-05-06 16:21:35 +02:00
Shoghi Cervantes
fb257c16f1 Set entities on fire if hit by an entity on fire 2015-04-30 11:40:22 +02:00
Shoghi Cervantes
7b699d9afd Improved fall damage while on jump boost, new protocol update, build 7, allow for live inventory resizing 2015-04-24 16:43:59 +02:00
Shoghi Cervantes
0b176b3fe0 Implemented Channeled packet sending 2015-04-14 18:24:40 +02:00
Shoghi Cervantes
69f841a00c
Added Squids with basic AI 2015-04-09 00:12:50 +02:00