Improve labeled chest caching interactions

This commit is contained in:
Tanner
2026-11-07 18:23:55 +00:00
parent 34d902c46d
commit 688297e968
7 changed files with 240 additions and 25 deletions
+10 -1
View File
@@ -4,7 +4,9 @@ import time
from contextlib import nullcontext
from minecraft.networking.packets import Packet
from minecraft.networking.types import Float, Long, VarInt, VarLong
from minecraft.networking.types import (
Float, Long, UnsignedByte, VarInt, VarLong,
)
from minecraft.networking.modern import (
ChatCommand, ClientboundPlayerChatPacket, ServerboundChatPacket, SystemChat,
)
@@ -29,6 +31,13 @@ class UpdateTimePacket(Packet):
})
class PlayerInputPacket(Packet):
"""Serverbound key state, including sneak for container-safe placement."""
id = 0x2B
packet_name = 'player input'
definition = [{'flags': UnsignedByte}]
class PlayerCommandPacket(Packet):
"""Client player-command packet; action 0 stops sleeping (protocol 777)."""
id = 0x2A