mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2024-09-30 04:29:07 +02:00
use static chunk type instances
This commit is contained in:
parent
462e68a0af
commit
54a1f42724
@ -59,7 +59,7 @@ public class Protocol1_14to3D_Shareware extends BackwardsProtocol<ClientboundPac
|
||||
this.registerClientbound(ClientboundPackets3D_Shareware.CHUNK_DATA, wrapper -> {
|
||||
final ChunkCenterTracker3D_Shareware entityTracker = wrapper.user().get(ChunkCenterTracker3D_Shareware.class);
|
||||
|
||||
final Chunk chunk = wrapper.passthrough(new ChunkType1_14());
|
||||
final Chunk chunk = wrapper.passthrough(ChunkType1_14.TYPE);
|
||||
final int diffX = Math.abs(entityTracker.getChunkCenterX() - chunk.getX());
|
||||
final int diffZ = Math.abs(entityTracker.getChunkCenterZ() - chunk.getZ());
|
||||
|
||||
|
@ -73,8 +73,8 @@ public class BlockItemPackets20w14infinite extends ItemRewriter<ClientboundPacke
|
||||
@Override
|
||||
public void register() {
|
||||
handler(wrapper -> {
|
||||
Chunk chunk = wrapper.read(new ChunkType1_15());
|
||||
wrapper.write(new ChunkType1_16(), chunk);
|
||||
Chunk chunk = wrapper.read(ChunkType1_15.TYPE);
|
||||
wrapper.write(ChunkType1_16.TYPE, chunk);
|
||||
|
||||
chunk.setIgnoreOldLightData(chunk.isFullChunk());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user