Skip to content

Commit

Permalink
@Z750 There are other command block types
Browse files Browse the repository at this point in the history
Blocks.dc and .dd (don't know why they ain't renamed yet).
cc GH-478
  • Loading branch information
Black-Hole authored and Zach Brown committed Nov 14, 2016
1 parent bd503d3 commit 6c18808
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 27f801bd116e4387e6b7b1696b23adf140940e4a Mon Sep 17 00:00:00 2001
From 2693dcda742dac4a8ffd686a0cd52fddd36c5449 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 12 Nov 2016 23:25:22 -0600
Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items
Expand All @@ -22,15 +22,17 @@ index 9d361cb..651f23e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index dcfdd31..f62fdde 100644
index dcfdd31..abc4b5c 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -250,6 +250,12 @@ public class EntityFallingBlock extends Entity {
@@ -250,6 +250,14 @@ public class EntityFallingBlock extends Entity {
this.block = Block.getById(nbttagcompound.getByte("Tile") & 255).fromLegacyData(i);
}

+ // Paper start - Block FallingBlocks with Command Blocks
+ if (this.world.paperConfig.filterNBTFromSpawnEgg && this.block.getBlock() == Blocks.COMMAND_BLOCK) {
+ // Check mappings on update - dc = "repeating_command_block" - dd = "chain_command_block"
+ final Block b = this.block.getBlock();
+ if (this.world.paperConfig.filterNBTFromSpawnEgg && (b == Blocks.COMMAND_BLOCK || b == Blocks.dc || b == Blocks.dd)) {
+ this.block = Blocks.STONE.getBlockData();
+ }
+ // Paper end
Expand Down

0 comments on commit 6c18808

Please sign in to comment.