Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -11,21 +11,25 @@
public class EntityThrownTrident extends EntityArrow {
private static final DataWatcherObject<Byte> ID_LOYALTY = DataWatcher.defineId(EntityThrownTrident.class, DataWatcherRegistry.BYTE);
@@ -69,7 +73,7 @@
this.spawnAtLocation(this.getPickupItem(), 0.1F);
@@ -75,10 +79,10 @@
}
}
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
} else {
this.setNoPhysics(true);
Vec3D vec3d = entity.getEyePosition().subtract(this.position());
@@ -129,7 +133,7 @@
if (!(entity instanceof EntityHuman) && this.position().distanceTo(entity.getEyePosition()) < (double) entity.getBbWidth() + 1.0D) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
return;
}
@@ -136,7 +140,7 @@
world = this.level();
if (world instanceof WorldServer) {
- worldserver = (WorldServer) world;
+ WorldServer worldserver = (WorldServer) world; // CraftBukkit - decompile error
EnchantmentManager.doPostAttackEffectsWithItemSource(worldserver, entity, damagesource, this.getWeaponItem());
}
EnchantmentManager.doPostAttackEffectsWithItemSourceOnBreak(worldserver, entity, damagesource, this.getWeaponItem(), (item) -> {
this.kill(worldserver);
});