mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-08 11:50:32 +01:00
SPIGOT-1076: Add HurtEntities API for FallingBlock.
This commit is contained in:
parent
a0d2928ba4
commit
62a216966f
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -4,6 +4,8 @@
|
||||
@@ -4,13 +4,15 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
@ -9,6 +9,14 @@
|
||||
public class EntityFallingBlock extends Entity {
|
||||
|
||||
private IBlockData block;
|
||||
public int ticksLived;
|
||||
public boolean dropItem = true;
|
||||
private boolean e;
|
||||
- private boolean hurtEntities;
|
||||
+ public boolean hurtEntities; // PAIL: private -> public
|
||||
private int fallHurtMax = 40;
|
||||
private float fallHurtAmount = 2.0F;
|
||||
public NBTTagCompound tileEntityData;
|
||||
@@ -56,7 +58,7 @@
|
||||
|
||||
if (this.ticksLived++ == 0) {
|
||||
|
@ -47,4 +47,14 @@ public class CraftFallingSand extends CraftEntity implements FallingSand {
|
||||
public void setDropItem(boolean drop) {
|
||||
getHandle().dropItem = drop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHurtEntities() {
|
||||
return getHandle().hurtEntities;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHurtEntities(boolean hurtEntities) {
|
||||
getHandle().hurtEntities = hurtEntities;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user