SPIGOT-2060: Method to control whether entities collide

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-03-27 20:19:41 +11:00
parent c165b940ae
commit eb3bbd68cc
2 changed files with 43 additions and 23 deletions

View File

@@ -540,4 +540,14 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public boolean hasAI() {
return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).cR() : false; // PAIL: rename
}
@Override
public void setCollidable(boolean collidable) {
getHandle().collides = collidable;
}
@Override
public boolean isCollidable() {
return getHandle().collides;
}
}