mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 18:57:32 +00:00
Fixed players being able to push NPCs around.
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user