mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 12:51:09 -05:00
Unknown value in update light packet is trust edges
This commit is contained in:
parent
597d60bed5
commit
ec957221a9
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue