2025-03-26 03:05:00 +11:00

41 lines
1.6 KiB
Diff

--- a/net/minecraft/world/entity/projectile/EntityEvokerFangs.java
+++ b/net/minecraft/world/entity/projectile/EntityEvokerFangs.java
@@ -16,6 +16,10 @@
import net.minecraft.world.item.enchantment.EnchantmentManager;
import net.minecraft.world.level.World;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
+// CraftBukkit end
+
public class EntityEvokerFangs extends Entity implements TraceableEntity {
public static final int ATTACK_DURATION = 20;
@@ -70,7 +74,7 @@
@Override
protected void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
this.warmupDelayTicks = nbttagcompound.getIntOr("Warmup", 0);
- this.ownerUUID = (UUID) nbttagcompound.read("Owner", UUIDUtil.CODEC).orElse((Object) null);
+ this.ownerUUID = (UUID) nbttagcompound.read("Owner", UUIDUtil.CODEC).orElse(null); // CraftBukkit - decompile error
}
@Override
@@ -111,7 +115,7 @@
}
if (--this.lifeTicks < 0) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
}
}
@@ -122,7 +126,7 @@
if (entityliving.isAlive() && !entityliving.isInvulnerable() && entityliving != entityliving1) {
if (entityliving1 == null) {
- entityliving.hurt(this.damageSources().magic(), 6.0F);
+ entityliving.hurt(this.damageSources().magic().customEntityDamager(this), 6.0F); // CraftBukkit
} else {
if (entityliving1.isAlliedTo((Entity) entityliving)) {
return;