Filter bad block entity nbt data from falling blocks

This commit is contained in:
Zach Brown 2016-11-12 23:25:22 -06:00
parent 472983f423
commit b1018e6808

View file

@ -108,3 +108,12 @@
this.callOnBrokenAfterFall(block, blockposition);
}
}
@@ -328,7 +356,7 @@
this.dropItem = nbt.getBoolean("DropItem");
}
- if (nbt.contains("TileEntityData", 10)) {
+ if (nbt.contains("TileEntityData", 10) && !(this.level().paperConfig().entities.spawning.filterBadTileEntityNbtFromFallingBlocks && this.blockState.getBlock() instanceof net.minecraft.world.level.block.GameMasterBlock)) { // Paper - Filter bad block entity nbt data from falling blocks
this.blockData = nbt.getCompound("TileEntityData").copy();
}