mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Fix out of bounds falling block removal (#2188)
This commit is contained in:
parent
5968b5c6e0
commit
c4e610e33c
@ -36,23 +36,26 @@ index c348d6bec3..f5647a171d 100644
|
||||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index c9c903367f..55591fbe05 100644
|
||||
index c9c903367f..fee5e67877 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
}
|
||||
|
||||
if (!this.onGround && !flag1) {
|
||||
if (!this.world.isClientSide && (this.ticksLived > 100 && (blockposition.getY() < 1 || blockposition.getY() > 256) || this.ticksLived > 600)) {
|
||||
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { // Paper - Configurable EntityFallingBlock height nerf
|
||||
if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) {
|
||||
this.a((IMaterial) block);
|
||||
}
|
||||
|
||||
this.die();
|
||||
+ } // Paper
|
||||
}
|
||||
} else {
|
||||
IBlockData iblockdata = this.world.getType(blockposition);
|
||||
this.move(EnumMoveType.SELF, this.getMot());
|
||||
+
|
||||
+ // Paper start - Configurable EntityFallingBlock height nerf
|
||||
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) {
|
||||
+ if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) {
|
||||
+ this.a(block);
|
||||
+ }
|
||||
+
|
||||
+ this.die();
|
||||
+ }
|
||||
+ // Paper end
|
||||
if (!this.world.isClientSide) {
|
||||
blockposition = new BlockPosition(this);
|
||||
boolean flag = this.block.getBlock() instanceof BlockConcretePowder;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index ba86a07344..e3001570f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
|
@ -51,7 +51,7 @@ index f5647a171d..205376f6af 100644
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
double[] adouble1 = adouble;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 55591fbe05..90becdfdec 100644
|
||||
index a4984aa9a8..23a1f8c77c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
|
@ -30,7 +30,7 @@ index eed454bf40..4892113a15 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 90becdfdec..f54887e5e8 100644
|
||||
index 23a1f8c77c..a86dd55292 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
|
Loading…
Reference in New Issue
Block a user