mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-22 15:22:56 +01:00
Fix Light & window click test
This commit is contained in:
parent
88052576b3
commit
97d17f9b8b
@ -13,7 +13,7 @@ public class ClientClickWindowPacket extends ClientPlayPacket {
|
||||
public byte windowId;
|
||||
public short slot;
|
||||
public byte button;
|
||||
public ClickType clickType;
|
||||
public ClickType clickType = ClickType.PICKUP;
|
||||
public Short2ObjectMap<ItemStack> changedSlots = new Short2ObjectOpenHashMap<>();
|
||||
public ItemStack item = ItemStack.AIR;
|
||||
|
||||
|
@ -90,19 +90,20 @@ public class UpdateLightPacket implements ServerPacket, CacheablePacket {
|
||||
|
||||
// sky light
|
||||
skyLight.clear();
|
||||
for (int i = 0; i < 14; i++) {
|
||||
final int skyLightCount = reader.readVarInt();
|
||||
for (int i = 0; i < skyLightCount; i++) {
|
||||
int length = reader.readVarInt();
|
||||
if (length != 2048) {
|
||||
throw new IllegalStateException("Length must be 2048.");
|
||||
}
|
||||
|
||||
byte[] bytes = reader.readBytes(length);
|
||||
skyLight.add(bytes);
|
||||
}
|
||||
|
||||
// block light
|
||||
blockLight.clear();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
final int blockLightCount = reader.readVarInt();
|
||||
for (int i = 0; i < blockLightCount; i++) {
|
||||
int length = reader.readVarInt();
|
||||
if (length != 2048) {
|
||||
throw new IllegalStateException("Length must be 2048.");
|
||||
|
Loading…
Reference in New Issue
Block a user