Fix block remaps

This commit is contained in:
KennyTV 2019-06-02 00:00:38 +02:00
parent c2d72214de
commit 0084f764ba
3 changed files with 3 additions and 3 deletions

View File

@ -280,7 +280,7 @@ public class Protocol1_13_2To1_14 extends BackwardsProtocol {
int newId = BackwardsMappings.blockMappings.getNewBlock(id); int newId = BackwardsMappings.blockMappings.getNewBlock(id);
if (newId == -1) { if (newId == -1) {
ViaBackwards.getPlatform().getLogger().warning("Missing 1.14 block id for 1.13.2 block " + id); ViaBackwards.getPlatform().getLogger().warning("Missing 1.14 block id for 1.13.2 block " + id);
return 0; return id;
} }
return newId; return newId;
} }

View File

@ -24,7 +24,7 @@ public class BackwardsMappings {
ViaBackwards.getPlatform().getLogger().info("Loading 1.14 -> 1.13.2 block mapping..."); ViaBackwards.getPlatform().getLogger().info("Loading 1.14 -> 1.13.2 block mapping...");
blockStateMappings = new BlockMappingsShortArray(mapping1_14.getAsJsonObject("blockstates"), mapping1_13_2.getAsJsonObject("blockstates"), mapping1_13_2to1_14.getAsJsonObject("blockstates")); blockStateMappings = new BlockMappingsShortArray(mapping1_14.getAsJsonObject("blockstates"), mapping1_13_2.getAsJsonObject("blockstates"), mapping1_13_2to1_14.getAsJsonObject("blockstates"));
blockMappings = new BlockMappingsShortArray(mapping1_14.getAsJsonObject("blocks"), mapping1_13_2.getAsJsonObject("blocks"), mapping1_13_2to1_14.getAsJsonObject("blocks")); //blockMappings = new BlockMappingsShortArray(mapping1_14.getAsJsonObject("blocks"), mapping1_13_2.getAsJsonObject("blocks"), mapping1_13_2to1_14.getAsJsonObject("blocks"));
} }

View File

@ -449,7 +449,7 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
handler(new PacketHandler() { handler(new PacketHandler() {
@Override @Override
public void handle(PacketWrapper wrapper) throws Exception { public void handle(PacketWrapper wrapper) throws Exception {
wrapper.set(Type.VAR_INT, 0, Protocol1_13_2To1_14.getNewBlockId(wrapper.get(Type.VAR_INT, 0))); wrapper.set(Type.VAR_INT, 0, Protocol1_13_2To1_14.getNewBlockStateId(wrapper.get(Type.VAR_INT, 0))); //TODO proper block id
} }
}); });
} }