mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-22 16:57:40 +01:00
Uncache state ids on inventory close
This commit is contained in:
parent
d62165bf51
commit
edf9ccca8b
@ -41,6 +41,15 @@ public final class Protocol1_17To1_17_1 extends BackwardsProtocol<ClientboundPac
|
||||
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
registerClientbound(ClientboundPackets1_17.CLOSE_WINDOW, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
short containerId = wrapper.passthrough(Type.UNSIGNED_BYTE);
|
||||
wrapper.user().get(InventoryStateIds.class).removeStateId(containerId);
|
||||
});
|
||||
}
|
||||
});
|
||||
registerClientbound(ClientboundPackets1_17.SET_SLOT, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
@ -68,6 +77,15 @@ public final class Protocol1_17To1_17_1 extends BackwardsProtocol<ClientboundPac
|
||||
}
|
||||
});
|
||||
|
||||
registerServerbound(ServerboundPackets1_17.CLOSE_WINDOW, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
short containerId = wrapper.passthrough(Type.UNSIGNED_BYTE);
|
||||
wrapper.user().get(InventoryStateIds.class).removeStateId(containerId);
|
||||
});
|
||||
}
|
||||
});
|
||||
registerServerbound(ServerboundPackets1_17.CLICK_WINDOW, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
|
Loading…
Reference in New Issue
Block a user