Fixed players being able to push NPCs around.

This commit is contained in:
luisc committed 2021-12-13 00:16:06 -06:00
1 parent 541958b630
commit 00557df9a7
1 file changed
+16
@@ -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;
}