This commit is contained in:
Tnze
2021-11-30 16:12:12 +08:00
parent 0ee74ebce2
commit b34044cff9
2 changed files with 96 additions and 42 deletions

View File

@ -56,15 +56,20 @@ func (m *Manager) onOpenScreen(p pk.Packet) error {
func (m *Manager) onSetContentPacket(p pk.Packet) error {
var (
ContainerID pk.UnsignedByte
Count pk.Short
StateID pk.VarInt
Count pk.VarInt
SlotData []Slot
CarriedItem Slot
)
if err := p.Scan(
&ContainerID,
&StateID,
&Count, pk.Ary{
Len: &Count,
Ary: &SlotData,
}); err != nil {
},
&CarriedItem,
); err != nil {
return Error{err}
}
// copy the slot data to container