930 Commits

Author SHA1 Message Date
Stephen
51d18ffb89 Merge branch 'stable' of https://github.com/pmmp/PocketMine-MP into stable 2019-11-06 22:10:41 -05:00
Dylan K. Taylor
cac3c356a5 Painting: fix dropping multiple items when multiple blockupdates occur in the same tick
test case: place sand on top of a line of signs, put a painting on the sand and break the supporting sign
fixes #2774 for stable
2019-11-06 14:29:43 -05:00
Stephen
4ea907ae1a Start saving new skin data 2019-11-05 21:01:01 -05:00
Drew
cd2b60a860 Initial update to 1.13 2019-10-30 21:36:08 -04:00
Dylan K. Taylor
32ad9d0c1a Squid: fix spammy rotation in enclosed spaces
this bug was caused by 2f3c77c68a0d9e0fdfb0eb69bd44344f4c8d028d. It looks unrelated to the commit title, so it may have been committed by mistake.
2019-10-22 22:50:35 +01:00
Dylan K. Taylor
39cc590829 Skin: accommodate JSON geometry containing comments, closes #3121 2019-10-21 22:26:48 +01:00
Dylan K. Taylor
f347345bb3 Human::getInventory(): explicitly declare return type
the lack of this causes type inference bugs and documentation problems.
thanks PHPStan
2019-10-21 15:25:57 +01:00
Dylan T
11a6e04a28
EnderPearl: remove collision box hack (this isn't needed for MCPE anyway)
This was intended to address the problem that ender pearls would not stop on grass, saplings, and other similar objects. However, they don't stop on such objects in MCPE anyway, only PC.
2019-09-18 10:02:52 +01:00
Dylan K. Taylor
092edc9d43 avoid breaking concrete powder 2019-08-16 17:41:50 +01:00
Dylan K. Taylor
2ba8eac27f FallingBlock: fix endless falling on top of fences
this is a shitty fix, but I don't think there's a better way to do it on 3.x. This also fixes dropping on cactus.
close #2449, close #2895
2019-08-16 17:27:41 +01:00
Dylan K. Taylor
2f61d42518 backport d23eeff8324e51ea1a902271603c50551e074c1b: FallingBlock: remove useless check 2019-08-11 19:38:12 +01:00
Dylan K. Taylor
dbb669b156 Entity: add some deprecation warnings to despawnFrom() and despawnFromAll() 2019-08-11 19:34:57 +01:00
Dylan K. Taylor
4d0e8741fe Added a deprecation notice to Entity->getBlocksAround() 2019-08-11 19:32:21 +01:00
Dylan K. Taylor
807b860cfe protocol: fixup data type changes, closes #3072 2019-08-11 19:02:16 +01:00
Dylan K. Taylor
d874be99a6 PrimedTNT: fix explosion position, close #3037 2019-07-16 13:55:31 +01:00
Dylan K. Taylor
50d71809e1 Entity: fixed onfire flag being set when setting fire ticks to zero, closes #3031 2019-07-14 19:03:06 +01:00
Dylan K. Taylor
a883c35fd0 clean up yesterday's mess 2019-07-13 18:15:14 +01:00
Dylan K. Taylor
c58a1bf9b7 Protocol changes for 1.12.0.28 2019-07-12 19:00:15 +01:00
Dylan K. Taylor
c7a5b8b0b4 Fixed noDamageTicks not preventing damage when last damage cause is null
noDamageTicks should make the entity completely invulnerable while active.
2019-07-07 17:37:52 +01:00
Dylan K. Taylor
77a4393c7b Fixed possible out-of-bounds access on corrupted playerdata when loading inventory contents 2019-07-06 19:39:07 +01:00
Encritary
3c7f68dc1e Fix Entity::isNameTagAlwaysVisible() was returning the wrong value (#2990)
* Fix Entity::isNameTagAlwaysVisible() was returning the wrong value

* "> 0" to "=== 1"
2019-07-02 10:44:41 +01:00
Dylan K. Taylor
971ad04299 Attribute: add more things
i got tired of commenting out exceptions in packets, so this is the quickest way to fix the problem.
2019-06-03 17:37:18 +01:00
Dylan K. Taylor
76e5ea385b Skin: improved error checking
plugin devs should find this less of a pain in the ass now.
2019-05-17 17:40:27 +01:00
Fabian Faßbender
c5498bb3fa Implement a locking variable to circumvent a infinite regression (#2901)
closes #2876
2019-05-03 14:46:51 +01:00
Dylan K. Taylor
d7a35a5302 Entity: fixed motion not being initialized when Motion NBT tag is missing
fixes CA 2355485
2019-05-02 14:00:28 +01:00
Dylan K. Taylor
396efbac7e Human: simplify setFood() 2019-04-26 12:40:15 +01:00
Dylan K. Taylor
fa70127241 1.11.0 protocol changes 2019-04-24 19:54:16 +01:00
Dylan K. Taylor
95313e0a90 Updated some entity metadata properties 2019-04-08 14:42:33 +01:00
Dylan K. Taylor
0659d2fbef Backport 6bd43a8215b9e612478fe789da9a58b36f0f0e73: Firehose auto-tick-rate anti-feature, closes #2665 2019-03-09 19:20:53 +00:00
Dylan K. Taylor
2164dbae67 Fixed reloaded arrows not despawning, closes #2781 2019-02-26 19:58:21 +00:00
Dylan K. Taylor
074baf7e1c Merge branch '3.5' into 3.6 2019-02-17 17:08:15 +00:00
Dylan K. Taylor
2e0dd574e0 Set default health attribute value when changing max health, closes #2771 2019-02-17 17:06:32 +00:00
Dylan K. Taylor
e16d8e31af Merge branch '3.5' into 3.6 2019-02-17 11:33:46 +00:00
Dylan K. Taylor
3c93a57397 Entity: add a hack to prevent client-side movement when entity is not moving
this fixes #2227.
2019-02-17 11:33:34 +00:00
Dylan K. Taylor
e71e18fc88 Merge branch '3.5' into 3.6 2019-02-14 16:02:30 +00:00
Dylan K. Taylor
e1bacb5c6d Human: fixed hunger underflow when value is a fraction, closes #2761 2019-02-14 16:01:25 +00:00
Dylan K. Taylor
9da7c6af27 new metadata properties 2019-02-10 13:59:21 +00:00
Dylan K. Taylor
791b4d8ef3 SplashPotion: measure distance from eye height instead of base
this fixes effect durations being off (mostly), closes #2650
there are still some minor differences, but this is closer matching than the previous version.
2019-02-03 11:32:47 +00:00
Dylan K. Taylor
187f36fe38 ExperienceOrb: clean up some confusing code 2019-01-23 16:46:18 +00:00
Dylan K. Taylor
dc89b48354 Human: Fixed XP drop amount to match vanilla
In vanilla it doesn't drop the exact number of points you collected. Rather, you lose a little for every level above 1 you had (1 level requires 7 points, later levels require +2 per level), and can recover at most 100 points. Hence, if you had 10 levels, you get back enough points to fill 5 levels and most of a 6th. 14-15 levels gets you the upper bound of about 7.5 levels.
2019-01-23 12:39:25 +00:00
Dylan K. Taylor
e6d1c1dfbc Living: Get rid of delayed XP spawning, closes #2644
This is not identical to vanilla, but I don't care because it gets rid of edge cases and also makes it easier to integrate with EntityDeathEvent in the future.
2019-01-23 12:31:05 +00:00
Dylan K. Taylor
a27c9409f1 ExperienceOrb: fixed wrong condition 2019-01-20 12:30:24 +00:00
Dylan K. Taylor
854f851525 ExperienceOrb: don't follow players in other worlds 2019-01-20 12:30:09 +00:00
Dylan K. Taylor
4fd3bee360 Entity: Address fireticks crashdumps
This will now throw an exception at the source instead of crashing when the entity is saved, which should put the blame on the correct plugin responsible for this.
This also includes magic method hacks to preserve backwards compatibility, since the fireTicks field is now protected.
2019-01-19 16:05:10 +00:00
Dylan K. Taylor
b22a2ef914 Living: Despawn in endDeathAnimation()
this removes the necessity for the player to do this.
2019-01-05 12:46:11 +00:00
Dylan K. Taylor
4b9a142a5d Import global functions and constants for enhanced performance
This is better for performance because these then don't need to be reevaluated every time they are called.

When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.

However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
Dylan K. Taylor
8650c187f9 Entity: fixed mob head yaw 2019-01-02 15:04:56 +00:00
Dylan K. Taylor
d2d65ce6cc Attribute: Fix exception messages, make them less useless 2018-12-30 13:44:30 +00:00
Dylan K. Taylor
42f8e061a5 Merge branch 'release/3.4' into release/3.5 2018-12-22 13:29:41 +00:00
Dylan K. Taylor
0299191e64 Attribute: fit value when resetting to default, closes #2599 2018-12-22 11:44:36 +00:00