mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
SPIGOT-2060: Method to control whether entities collide
This commit is contained in:
1 parent
1ea1adc10f
commit
cd36f6f257
2 files changed
+43
-23
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user