warden AI
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
--- a/net/minecraft/world/entity/ai/behavior/warden/Digging.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/warden/Digging.java
|
||||
@@ -10,6 +10,10 @@
|
||||
import net.minecraft.world.entity.ai.memory.MemoryStatus;
|
||||
import net.minecraft.world.entity.monster.warden.Warden;
|
||||
|
||||
+// CraftBukkit start - imports
|
||||
+import org.bukkit.event.entity.EntityRemoveEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class Digging<E extends Warden> extends Behavior<E> {
|
||||
|
||||
public Digging(int duration) {
|
||||
@@ -37,7 +41,7 @@
|
||||
|
||||
protected void stop(ServerLevel worldserver, E e0, long i) {
|
||||
if (e0.getRemovalReason() == null) {
|
||||
- e0.remove(Entity.RemovalReason.DISCARDED);
|
||||
+ e0.remove(Entity.RemovalReason.DISCARDED, EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - Add bukkit remove cause
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
|
||||
@@ -83,7 +83,7 @@
|
||||
if (target.hurtServer(world, world.damageSources().sonicBoom(entity), 10.0F)) {
|
||||
double d = 0.5 * (1.0 - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE));
|
||||
double e = 2.5 * (1.0 - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE));
|
||||
- target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e);
|
||||
+ target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e, entity); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user