Fixed block remapping not working in <=1.6.4

This commit is contained in:
RaphiMC 2023-01-18 00:09:36 +01:00
parent 97464ce3b0
commit a7427ea6d5
2 changed files with 4 additions and 2 deletions

View File

@ -6,4 +6,4 @@ org.gradle.configureondemand=true
# Project properties
maven_name=ViaLegacy
maven_group=net.raphimc
maven_version=2.2.1
maven_version=2.2.2

View File

@ -196,6 +196,8 @@ public class Protocol1_7_2_5to1_6_4 extends AbstractProtocol<ClientboundPackets1
final byte dimensionId = wrapper.get(Type.BYTE, 0);
wrapper.user().get(DimensionTracker.class).setDimension(dimensionId);
wrapper.user().get(ClientWorld.class).setEnvironment(dimensionId);
wrapper.user().put(new ChunkTracker(wrapper.user()));
});
}
});
@ -1187,7 +1189,7 @@ public class Protocol1_7_2_5to1_6_4 extends AbstractProtocol<ClientboundPackets1
if (!userConnection.has(ClientWorld.class)) {
userConnection.put(new ClientWorld(userConnection));
}
userConnection.put(new ChunkTracker(userConnection));
userConnection.put(new ChunkTracker(userConnection)); // Set again in JOIN_GAME handler for version comparisons to work
if (userConnection.getChannel() != null) {
userConnection.getChannel().pipeline().addFirst(new ChannelOutboundHandlerAdapter() {