Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-25 07:40:08 +01:00
Uncache state ids on inventory close
Dieser Commit ist enthalten in:
Ursprung
d62165bf51
Commit
edf9ccca8b
@ -41,6 +41,15 @@ public final class Protocol1_17To1_17_1 extends BackwardsProtocol<ClientboundPac
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerPackets() {
|
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() {
|
registerClientbound(ClientboundPackets1_17.SET_SLOT, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
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() {
|
registerServerbound(ServerboundPackets1_17.CLICK_WINDOW, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren