Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Use ClientboundPackets1_16#CLOSE_WINDOW instead of byte for packet ID
Dieser Commit ist enthalten in:
Ursprung
d3cadaf90f
Commit
f3d8b47add
@ -16,6 +16,7 @@ import us.myles.ViaVersion.api.type.Type;
|
|||||||
import us.myles.ViaVersion.api.type.types.UUIDIntArrayType;
|
import us.myles.ViaVersion.api.type.types.UUIDIntArrayType;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_15to1_14_4.ClientboundPackets1_15;
|
import us.myles.ViaVersion.protocols.protocol1_15to1_14_4.ClientboundPackets1_15;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.data.RecipeRewriter1_14;
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.data.RecipeRewriter1_14;
|
||||||
|
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.ClientboundPackets1_16;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.Protocol1_16To1_15_2;
|
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.Protocol1_16To1_15_2;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.ServerboundPackets1_16;
|
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.ServerboundPackets1_16;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.data.MappingData;
|
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.data.MappingData;
|
||||||
@ -39,7 +40,7 @@ public class InventoryPackets {
|
|||||||
InventoryTracker1_16 inventoryTracker = wrapper.user().get(InventoryTracker1_16.class);
|
InventoryTracker1_16 inventoryTracker = wrapper.user().get(InventoryTracker1_16.class);
|
||||||
if (inventoryTracker.getInventory() != -1) {
|
if (inventoryTracker.getInventory() != -1) {
|
||||||
// Close open inventory before opening a new one.
|
// Close open inventory before opening a new one.
|
||||||
PacketWrapper closePacket = wrapper.create(0x13); // 1.16 inventory close
|
PacketWrapper closePacket = wrapper.create(ClientboundPackets1_16.CLOSE_WINDOW.ordinal());
|
||||||
closePacket.write(Type.UNSIGNED_BYTE, inventoryTracker.getInventory());
|
closePacket.write(Type.UNSIGNED_BYTE, inventoryTracker.getInventory());
|
||||||
closePacket.send(Protocol1_16To1_15_2.class, true, true);
|
closePacket.send(Protocol1_16To1_15_2.class, true, true);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren