From ec957221a9bcc20f1ba6139a9a24eab2ac6b7b2d Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Sun, 21 Jun 2020 15:15:53 -0500 Subject: [PATCH] Unknown value in update light packet is trust edges --- .../ingame/server/world/ServerUpdateLightPacket.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerUpdateLightPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerUpdateLightPacket.java index 6b40e661..1e644d72 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerUpdateLightPacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerUpdateLightPacket.java @@ -23,11 +23,11 @@ public class ServerUpdateLightPacket implements Packet { private int x; private int z; - private boolean unknown; // TODO: Find what this value is + private boolean trustEdges; private @NonNull NibbleArray3d[] skyLight; private @NonNull NibbleArray3d[] blockLight; - public ServerUpdateLightPacket(int x, int z, boolean unknown, @NonNull NibbleArray3d[] skyLight, @NonNull NibbleArray3d[] blockLight) { + public ServerUpdateLightPacket(int x, int z, boolean trustEdges, @NonNull NibbleArray3d[] skyLight, @NonNull NibbleArray3d[] blockLight) { if(skyLight.length != NUM_ENTRIES) { throw new IllegalArgumentException("skyLight must have exactly " + NUM_ENTRIES + " entries (null entries are permitted)"); } @@ -38,7 +38,7 @@ public class ServerUpdateLightPacket implements Packet { this.x = x; this.z = z; - this.unknown = unknown; + this.trustEdges = trustEdges; this.skyLight = Arrays.copyOf(skyLight, skyLight.length); this.blockLight = Arrays.copyOf(blockLight, blockLight.length); } @@ -47,7 +47,7 @@ public class ServerUpdateLightPacket implements Packet { public void read(NetInput in) throws IOException { this.x = in.readVarInt(); this.z = in.readVarInt(); - this.unknown = in.readBoolean(); + this.trustEdges = in.readBoolean(); int skyLightMask = in.readVarInt(); int blockLightMask = in.readVarInt(); @@ -81,7 +81,7 @@ public class ServerUpdateLightPacket implements Packet { public void write(NetOutput out) throws IOException { out.writeVarInt(this.x); out.writeVarInt(this.z); - out.writeBoolean(this.unknown); + out.writeBoolean(this.trustEdges); int skyLightMask = 0; int blockLightMask = 0;