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); entityPacket.setTag(EntityIdentifierRegistry.ENTITY_IDENTIFIERS);
upstream.sendPacket(entityPacket); upstream.sendPacket(entityPacket);
InventoryContentPacket creativePacket = new InventoryContentPacket(); CreativeContentPacket creativePacket = new CreativeContentPacket();
creativePacket.setContainerId(ContainerId.CREATIVE); //TODO: Why is this deprecated? for (int i = 0; i < ItemRegistry.CREATIVE_ITEMS.length; i++) {
creativePacket.setContents(ItemRegistry.CREATIVE_ITEMS); creativePacket.getEntries().put(i, ItemRegistry.CREATIVE_ITEMS[i]);
}
upstream.sendPacket(creativePacket); upstream.sendPacket(creativePacket);
PlayStatusPacket playStatusPacket = new PlayStatusPacket(); PlayStatusPacket playStatusPacket = new PlayStatusPacket();