Commit Graph

337 Commits

Author SHA1 Message Date
Dylan K. Taylor
7864294336 Merge branch 'stable' into next-minor 2022-10-16 16:53:14 +01:00
IvanCraft623
14d17a9546 Remove Erroneous documentation (#5346) 2022-10-16 15:21:35 +01:00
Dylan K. Taylor
57deb60355 Merge branch 'stable' into next-minor 2022-10-13 21:03:50 +01:00
IvanCraft623
421379fc77 SplashPotion: Use World::getCollidingEntities() instead of World::getNearbyEntities() (#5326)
fixes spectator players receiving effects from splash potions
2022-10-11 22:57:35 +01:00
Dylan K. Taylor
6ae7cb288e Merge remote-tracking branch 'origin/stable' into next-minor 2022-10-11 21:59:40 +01:00
Dylan T
41970feb57 Entity: Fire EntitySpawnEvent/ItemSpawnEvent on the first entity tick, instead of in the constructor (#5314)
This allows plugins to modify the entity via setters in EntitySpawnEvent without their changes getting overwritten by setter calls directly after the 'new YourEntity' statement.

As well as benefiting plugins, this also clears a path for a BC-breaking change in PM5 (to have the programmer use addEntity() to spawn entities, instead of the constructor doing it, which will improve on a number of data handling aspects).

fixes #4973

This targets next-minor because it has some side effects on plugins that depended on the old behaviour, such as VanillaHopper, so it's not suitable for a patch release.
2022-09-29 22:30:12 +01:00
Dylan K. Taylor
cd4bb91676 Living: alter eye height so the player doesn't drown on the surface of water when swimming
fixes #4989
2022-09-29 00:15:07 +01:00
Dylan K. Taylor
bda0ca23b4 Living: deprecated hasLineOfSight() 2022-09-28 17:34:51 +01:00
Dylan K. Taylor
86a2f8e360 Merge branch 'stable' into next-minor 2022-09-28 01:01:51 +01:00
IvanCraft623
5e5661de75 Play burp sound when consuming a FoodSource (#5158) 2022-09-27 17:21:55 +01:00
Dylan K. Taylor
a7dfa0907c Merge branch 'stable' into next-minor 2022-09-24 18:07:56 +01:00
IvanCraft623
83a136a176 EntityFactory: Avoid code duplication on validation of creation functions (#5294) 2022-09-24 13:55:24 +01:00
Ali
3c55db531d HealthBoostEffect: Ensure that current health is within limits after reducing max health on removal(#5303) 2022-09-24 13:45:12 +01:00
Dylan K. Taylor
89e29448ee Merge branch 'stable' into next-minor 2022-09-20 20:18:06 +01:00
Dylan K. Taylor
23e98a30f5 ItemEntity: don't ignore parent's savable state 2022-09-20 14:50:35 +01:00
Dylan K. Taylor
5bc7ca6569 ItemEntity: disable saving if the contained item is air or has a zero count 2022-09-20 14:45:10 +01:00
IvanCraft623
9f97654f6f Update InstantDamage and Regeneration values (#5279) 2022-09-15 20:26:37 +01:00
Eren A. Akyol
82ba7903c8 Fixed wrong key being used for entity type ID in save data (#5288)
closes #5260
2022-09-15 13:40:48 +01:00
Dylan K. Taylor
3d03bb1301 Fix CS 2022-09-15 12:01:26 +01:00
Dylan K. Taylor
88eafdd614 Improve type info for RegistryTrait::getAll() and its users 2022-09-02 19:57:22 +01:00
Dylan K. Taylor
6dd5fec4ea ExperienceManager: remove superfluous doc comment 2022-09-02 19:38:23 +01:00
Dylan K. Taylor
f88c4d9a8c Remove more unnecessary local static variable usages
these are never mutated. Local constants would be better, if we had those.
2022-09-02 19:19:04 +01:00
Dylan K. Taylor
c9626c610b Skin: Correctly handle errors produced by commented JSON decoder 2022-08-16 17:35:23 +01:00
Dylan K. Taylor
dce8bd6d21 CS: Standardize new with braces 2022-08-15 17:16:23 +01:00
Dylan K. Taylor
df7a1fcba6 Changes for 1.19.20 2022-08-09 19:06:05 +01:00
Dylan K. Taylor
5e3b3a0700 Fix assert spam on debug clients 2022-07-24 17:51:02 +01:00
Dylan K. Taylor
baf75089f5 Entity: cancel fire damage for fireproof entities 2022-07-14 19:53:25 +01:00
Ali
705df7d508 EffectManager: remove redundant check (#5153) 2022-07-14 17:56:18 +01:00
Dylan K. Taylor
75d7adfb2d WitherEffect: fixed incorrect damage interval 2022-07-14 16:05:35 +01:00
Dylan K. Taylor
06655bee78 Updated to 1.19.10 2022-07-13 00:59:49 +01:00
Dylan K. Taylor
1584768c80 PaintingMotive: fixed botched painting fix from 0ea3861d43
I knew I should have used a singleton for this ...
2022-06-07 15:48:20 +01:00
Dylan K. Taylor
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
3fcf6372e0 Merge branch 'stable' into next-minor 2022-06-01 15:32:37 +01:00
Dylan K. Taylor
39b8daeeec Living: fixed a usage of hardcoded numeric ID 2022-05-25 22:23:14 +01:00
Dylan K. Taylor
6d941640a9 Merge branch 'stable' into next-minor 2022-05-20 11:14:59 +01:00
Dylan K. Taylor
0ea3861d43 Fixed paintings not working in newly generated worlds
Paintings would not work unless at least one entity was loaded from disk
(or saved).
2022-05-20 11:13:14 +01:00
Dylan K. Taylor
c0b15de504 Modernize private static property declarations 2022-05-17 21:55:16 +01:00
Dylan K. Taylor
ec6769a6fc Modernize private property declarations in src/entity 2022-05-17 20:42:17 +01:00
Duo Incure
89cc449808 Update exhaustion values for 1.18.30 (#5034) 2022-05-17 18:28:19 +01:00
Dylan K. Taylor
9ff1bf6deb Merge remote-tracking branch 'origin/stable' into next-minor 2022-05-11 13:12:45 +01:00
Dylan K. Taylor
6e372d9e36 Entity: fixed setNameTagVisible not having immediately visible effect 2022-05-01 14:54:41 +01:00
Dylan K. Taylor
937bb4c6ce Merge branch 'stable' into next-minor 2022-04-28 21:00:23 +01:00
Dylan K. Taylor
20ff5d5a3d Modernize property declarations in src/entity/animation 2022-04-28 15:33:13 +01:00
Dylan K. Taylor
c085bf0db4 Changes for 1.18.30 2022-04-20 13:59:50 +01:00
Dylan K. Taylor
e388cb1643 Merge branch 'stable' into next-minor 2022-04-10 21:23:04 +01:00
Dylan T
d1dfbd95e2 Entity: workaround teleport client bug #4394 by despawning and respawning the entity (#4870)
this is a sucky solution but it works well enough for this scenario.

From my research it appears that while the client-side MovementInterpolator is active on the client and hasn't yet reached its target, any teleport sent during the lerp will get overridden by the lerp.
This appears to last 3-4 ticks (about 150-200 ms) which explains why this can be reproduced by stopping movement just before the ender pearl lands (human reaction times would make the reproduction unreliable otherwise).

Things to note:
- All entities are affected by this bug.
- MovePlayerPacket appears not to have the problem, but we can't use it because it doesn't work for non-players.
- MoveActorAbsolute and MoveActorDelta are both handled by the same code and will have the same lerping bug.

This is the cleanest solution I could come up with.
2022-04-08 23:12:01 +01:00
Dylan K. Taylor
ab93135b84 Merge branch 'stable' into next-minor 2022-03-22 15:49:58 +00:00
Dylan K. Taylor
2b8a54f8ff Entity: added a guard to prevent __construct() from running multiple times
this typically happens due to flawed logic in child classes in plugins which causes parent::__construct() to get called multiple times.
2022-03-22 15:33:31 +00:00
Dylan K. Taylor
05fdd94754 fix CS 2022-03-12 00:57:32 +00:00
Dylan K. Taylor
05792826bc EntityFactory: use import aliases to improve readability slightly 2022-03-09 23:39:45 +00:00