13
0
geforkt von Mirrors/Paper

@Z750 There are other command block types

Blocks.dc and .dd (don't know why they ain't renamed yet).
cc GH-478
Dieser Commit ist enthalten in:
Black Hole 2016-11-13 20:20:14 -06:00 committet von Zach Brown
Ursprung bd503d35b0
Commit 6c1880847f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76

Datei anzeigen

@ -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
@ -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