mirror of
https://github.com/ViaVersion/ViaLegacy.git
synced 2024-11-15 10:45:19 +01:00
Remap invalid directional blocks in 1.8 -> 1.7.10
This commit is contained in:
parent
c00850bb25
commit
4998dbec16
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user