diff --git a/src/main/java/net/raphimc/vialegacy/protocols/release/protocol1_8to1_7_6_10/storage/ChunkTracker.java b/src/main/java/net/raphimc/vialegacy/protocols/release/protocol1_8to1_7_6_10/storage/ChunkTracker.java index ebb2359..3db7d1e 100644 --- a/src/main/java/net/raphimc/vialegacy/protocols/release/protocol1_8to1_7_6_10/storage/ChunkTracker.java +++ b/src/main/java/net/raphimc/vialegacy/protocols/release/protocol1_8to1_7_6_10/storage/ChunkTracker.java @@ -37,6 +37,8 @@ public class ChunkTracker extends AbstractChunkTracker { for (int i = 1; i < 7; i++) { // stone variants this.registerReplacement(new IdAndData(BlockList1_6.stone.blockID, i), new IdAndData(BlockList1_6.stone.blockID, 0)); } + this.registerInvalidDirectionReplacements(BlockList1_6.ladder.blockID, new IdAndData(BlockList1_6.planks.blockID, 0)); // Ladders with broken data values use the last ladder collision box the player has looked at. We just set them to a full block to avoid glitches. + this.registerInvalidDirectionReplacements(BlockList1_6.furnaceBurning.blockID, new IdAndData(BlockList1_6.furnaceBurning.blockID, 2)); this.registerReplacement(new IdAndData(BlockList1_6.chest.blockID, 0), new IdAndData(BlockList1_6.chest.blockID, 3)); } @@ -55,5 +57,14 @@ public class ChunkTracker extends AbstractChunkTracker { protected void postRemap(DataPalette palette) { palette.replaceId(BlockList1_6.portal.blockID << 4, 0); } + + private void registerInvalidDirectionReplacements(final int blockId, final IdAndData replacement) { + for (int i = 0; i < 2; i++) { + this.registerReplacement(new IdAndData(blockId, i), replacement); + } + for (int i = 6; i < 16; i++) { + this.registerReplacement(new IdAndData(blockId, i), replacement); + } + } }