pk.Ary and pk.Array using generic now

This commit is contained in:
Tnze
2022-03-20 01:17:25 +08:00
parent 7997a5faea
commit 4c2510565d
15 changed files with 95 additions and 155 deletions

View File

@ -96,15 +96,13 @@ func (m *Manager) onSetContentPacket(p pk.Packet) error {
var (
ContainerID pk.UnsignedByte
StateID pk.VarInt
Count pk.VarInt
SlotData []Slot
CarriedItem Slot
)
if err := p.Scan(
&ContainerID,
&StateID,
&Count, pk.Ary{
Len: &Count,
pk.Ary[pk.VarInt, *pk.VarInt]{
Ary: &SlotData,
},
&CarriedItem,