Add todo, map world name in 1.17 packets

This commit is contained in:
Nassim Jahnke 2021-09-14 17:37:05 +02:00
parent 8fff947863
commit 9615a5aba2
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,7 @@ public class Protocol1_13_2To1_14 extends BackwardsProtocol<ClientboundPackets1_
wrapper.read(Type.BYTE_ARRAY_PRIMITIVE);
}
//TODO Soft memory leak: Don't store light if chunk is already loaded
wrapper.user().get(ChunkLightStorage.class).setStoredLight(skyLight, blockLight, x, z);
wrapper.cancel();
}

View File

@ -77,6 +77,7 @@ public final class EntityPackets1_17 extends EntityRewriter<Protocol1_16_4To1_17
map(Type.STRING_ARRAY); // Worlds
map(Type.NBT); // Dimension registry
map(Type.NBT); // Current dimension data
map(Type.STRING); // World
handler(wrapper -> {
byte previousGamemode = wrapper.get(Type.BYTE, 0);
if (previousGamemode == -1) { // "Unset" gamemode removed
@ -113,6 +114,7 @@ public final class EntityPackets1_17 extends EntityRewriter<Protocol1_16_4To1_17
@Override
public void registerMap() {
map(Type.NBT); // Dimension data
map(Type.STRING); // World
handler(worldDataTrackerHandler(0));
handler(wrapper -> reduceExtendedHeight(wrapper.get(Type.NBT, 0), true));
}