23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
--- a/net/minecraft/world/entity/projectile/EntityEnderSignal.java
|
|
+++ b/net/minecraft/world/entity/projectile/EntityEnderSignal.java
|
|
@@ -21,6 +21,10 @@
|
|
import net.minecraft.world.level.World;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.event.entity.EntityRemoveEvent;
|
|
+// CraftBukkit end
|
|
+
|
|
public class EntityEnderSignal extends Entity implements ItemSupplier {
|
|
|
|
private static final float MIN_CAMERA_DISTANCE_SQUARED = 12.25F;
|
|
@@ -156,7 +160,7 @@
|
|
++this.life;
|
|
if (this.life > 80 && !this.level().isClientSide) {
|
|
this.playSound(SoundEffects.ENDER_EYE_DEATH, 1.0F, 1.0F);
|
|
- this.discard();
|
|
+ this.discard(this.surviveAfterDeath ? EntityRemoveEvent.Cause.DROP : EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
|
if (this.surviveAfterDeath) {
|
|
this.level().addFreshEntity(new EntityItem(this.level(), this.getX(), this.getY(), this.getZ(), this.getItem()));
|
|
} else {
|