Fix creative items

This commit is contained in:
DoctorMacc 2020-06-27 11:35:02 -04:00
parent 5b147f8dd1
commit 75f470cb33

View file

@ -225,9 +225,10 @@ public class GeyserSession implements CommandSender {
entityPacket.setTag(EntityIdentifierRegistry.ENTITY_IDENTIFIERS);
upstream.sendPacket(entityPacket);
InventoryContentPacket creativePacket = new InventoryContentPacket();
creativePacket.setContainerId(ContainerId.CREATIVE); //TODO: Why is this deprecated?
creativePacket.setContents(ItemRegistry.CREATIVE_ITEMS);
CreativeContentPacket creativePacket = new CreativeContentPacket();
for (int i = 0; i < ItemRegistry.CREATIVE_ITEMS.length; i++) {
creativePacket.getEntries().put(i, ItemRegistry.CREATIVE_ITEMS[i]);
}
upstream.sendPacket(creativePacket);
PlayStatusPacket playStatusPacket = new PlayStatusPacket();