PaperMC/paper-server/nms-patches/net/minecraft/world/entity/projectile/EntityThrownTrident.patch
CraftBukkit/Spigot eed041d629 Update to Minecraft 1.21
By: md_5 <git@md-5.net>
2024-06-14 01:05:00 +10:00

31 lines
1.3 KiB
Diff

--- a/net/minecraft/world/entity/projectile/EntityThrownTrident.java
+++ b/net/minecraft/world/entity/projectile/EntityThrownTrident.java
@@ -24,6 +24,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
+// CraftBukkit end
+
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);
}
- 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 @@
world = this.level();
if (world instanceof WorldServer) {
- worldserver = (WorldServer) world;
+ WorldServer worldserver = (WorldServer) world; // CraftBukkit - decompile error
EnchantmentManager.doPostAttackEffectsWithItemSource(worldserver, entity, damagesource, this.getWeaponItem());
}