#1221: Add methods to get/set FallingBlock CancelDrop
This commit is contained in:
parent
3be9ac1716
commit
9f64f0d22a
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/world/entity/item/EntityFallingBlock.java
|
--- a/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||||
+++ b/net/minecraft/world/entity/item/EntityFallingBlock.java
|
+++ b/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||||
@@ -49,6 +49,10 @@
|
@@ -49,13 +49,17 @@
|
||||||
import net.minecraft.world.phys.Vec3D;
|
import net.minecraft.world.phys.Vec3D;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@ -11,6 +11,14 @@
|
|||||||
public class EntityFallingBlock extends Entity {
|
public class EntityFallingBlock extends Entity {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
|
private IBlockData blockState;
|
||||||
|
public int time;
|
||||||
|
public boolean dropItem;
|
||||||
|
- private boolean cancelDrop;
|
||||||
|
+ public boolean cancelDrop; // PAIL private -> public
|
||||||
|
public boolean hurtEntities;
|
||||||
|
public int fallDamageMax;
|
||||||
|
public float fallDamagePerDistance;
|
||||||
@@ -83,10 +87,17 @@
|
@@ -83,10 +87,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,16 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
|||||||
getHandle().dropItem = drop;
|
getHandle().dropItem = drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getCancelDrop() {
|
||||||
|
return getHandle().cancelDrop;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelDrop(boolean cancelDrop) {
|
||||||
|
getHandle().cancelDrop = cancelDrop;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canHurtEntities() {
|
public boolean canHurtEntities() {
|
||||||
return getHandle().hurtEntities;
|
return getHandle().hurtEntities;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user