@didntpot: translate item group icon in CreativeContentPacket
This commit is contained in:
@@ -685,11 +685,16 @@ func (p *Protocol) downgradePackets(pks []packet.Packet, conn *minecraft.Conn) [
|
|||||||
}
|
}
|
||||||
case *packet.CreativeContent:
|
case *packet.CreativeContent:
|
||||||
items := make([]proto.CreativeItem, len(pk.Items))
|
items := make([]proto.CreativeItem, len(pk.Items))
|
||||||
|
groups := make([]protocol.CreativeGroup, len(pk.Groups))
|
||||||
for i, it := range pk.Items {
|
for i, it := range pk.Items {
|
||||||
items[i] = (&proto.CreativeItem{}).FromLatest(it)
|
items[i] = (&proto.CreativeItem{}).FromLatest(it)
|
||||||
}
|
}
|
||||||
|
for i, gr := range pk.Groups {
|
||||||
|
gr.Icon = p.itemTranslator.DowngradeItemStack(gr.Icon)
|
||||||
|
groups[i] = gr
|
||||||
|
}
|
||||||
pks[pkIndex] = &legacypacket.CreativeContent{
|
pks[pkIndex] = &legacypacket.CreativeContent{
|
||||||
Groups: pk.Groups,
|
Groups: groups,
|
||||||
Items: items,
|
Items: items,
|
||||||
}
|
}
|
||||||
case *packet.UpdateAbilities:
|
case *packet.UpdateAbilities:
|
||||||
|
|||||||
Reference in New Issue
Block a user