Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 17:10:13 +01:00
Read set slot inv id as unsigned byte for consistency
Dieser Commit ist enthalten in:
Ursprung
5cdaabeaec
Commit
48f1300908
@ -31,7 +31,7 @@ public class InventoryPackets {
|
||||
protocol.registerClientbound(ClientboundPackets1_13.SET_SLOT, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.BYTE); // 0 - Window ID
|
||||
map(Type.UNSIGNED_BYTE); // 0 - Window ID
|
||||
map(Type.SHORT); // 1 - Slot ID
|
||||
map(Type.FLAT_ITEM, Type.FLAT_VAR_INT_ITEM); // 2 - Slot Value
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class InventoryPackets extends ItemRewriter<Protocol1_13To1_12_2> {
|
||||
protocol.registerClientbound(ClientboundPackets1_12_1.SET_SLOT, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.BYTE); // 0 - Window ID
|
||||
map(Type.UNSIGNED_BYTE); // 0 - Window ID
|
||||
map(Type.SHORT); // 1 - Slot ID
|
||||
map(Type.ITEM, Type.FLAT_ITEM); // 2 - Slot Value
|
||||
|
||||
|
@ -106,7 +106,7 @@ public class InventoryPackets {
|
||||
protocol.registerClientbound(ClientboundPackets1_8.SET_SLOT, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.BYTE); // 0 - Window ID
|
||||
map(Type.UNSIGNED_BYTE); // 0 - Window ID
|
||||
map(Type.SHORT); // 1 - Slot ID
|
||||
map(Type.ITEM); // 2 - Slot Value
|
||||
handler(new PacketHandler() {
|
||||
@ -123,7 +123,7 @@ public class InventoryPackets {
|
||||
EntityTracker1_9 entityTracker = wrapper.user().getEntityTracker(Protocol1_9To1_8.class);
|
||||
|
||||
short slotID = wrapper.get(Type.SHORT, 0);
|
||||
short windowId = wrapper.get(Type.BYTE, 0);
|
||||
short windowId = wrapper.get(Type.UNSIGNED_BYTE, 0);
|
||||
|
||||
// Store item in slot
|
||||
inventoryTracker.setItemId(windowId, slotID, stack == null ? 0 : stack.identifier());
|
||||
|
@ -70,7 +70,7 @@ public abstract class ItemRewriter<T extends Protocol> extends RewriterBase<T> i
|
||||
protocol.registerClientbound(packetType, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.BYTE); // 0 - Window ID
|
||||
map(Type.UNSIGNED_BYTE); // 0 - Window ID
|
||||
map(Type.SHORT); // 1 - Slot ID
|
||||
map(type); // 2 - Slot Value
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren