From 00557df9a71b3fc97a394212189adc57d8b68147 Mon Sep 17 00:00:00 2001 From: luisc Date: Mon, 13 Dec 2021 00:16:06 -0600 Subject: [PATCH] Fixed players being able to push NPCs around. --- .../noppes/npcs/entity/EntityNPCInterface.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java index 991ba265f..0165c51ce 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java @@ -1590,11 +1590,27 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti if(!ai.ignoreCobweb) super.setInWeb(); } + @Override public boolean canBeCollidedWith(){ return !isKilled(); } + // obviously we dont want this + @Override + public boolean canBePushed() { + return false; + } + + // not any entity can collide. if you want projectiles to still be + // effective, you will have to handle those yourself + @Override + protected void collideWithEntity(Entity p_82167_1_) {} + + // checks for any entity within a certain boundingbox, eg minecarts + @Override + protected void collideWithNearbyEntities() {} + public boolean canFly(){ return false; }