Panda eating particles are not necessarily bamboo

This commit is contained in:
Camotoy 2024-05-02 20:33:28 -04:00
parent cab1a20034
commit b39ed5de53
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
2 changed files with 2 additions and 3 deletions

View file

@ -61,7 +61,8 @@ public class PandaEntity extends AnimalEntity {
EntityEventPacket packet = new EntityEventPacket();
packet.setRuntimeEntityId(geyserId);
packet.setType(EntityEventType.EATING_ITEM);
packet.setData(session.getItemMappings().getStoredItems().bamboo().getBedrockDefinition().getRuntimeId() << 16);
// As of 1.20.5 - pandas can eat cake
packet.setData(this.hand.getDefinition().getRuntimeId() << 16);
session.sendUpstreamPacket(packet);
}
}

View file

@ -40,7 +40,6 @@ import java.util.Map;
@Getter
@Accessors(fluent = true)
public class StoredItemMappings {
private final ItemMapping bamboo;
private final ItemMapping banner;
private final ItemMapping barrier;
private final ItemMapping compass;
@ -56,7 +55,6 @@ public class StoredItemMappings {
private final ItemMapping writtenBook;
public StoredItemMappings(Map<Item, ItemMapping> itemMappings) {
this.bamboo = load(itemMappings, Items.BAMBOO);
this.banner = load(itemMappings, Items.WHITE_BANNER); // As of 1.17.10, all banners have the same Bedrock ID
this.barrier = load(itemMappings, Items.BARRIER);
this.compass = load(itemMappings, Items.COMPASS);