#[solved] Need registry ID of item entity

1 messages · Page 1 of 1 (latest)

crystal badger
#
public void handleItemCollected(ClientPlayerEntity player, ItemEntity collectedItem)

I have this custom method that's called from a network thread on the client.
From collectedItem, I'd like to access the item registry identifier, say "minecraft:apple". I'm not able to figure this out, could someone guide me here?

gray pollen
#

Registries.ITEM.getId(collectedItem.getStack().getItem())?

crystal badger
#

I did not notice the getId() method, thanks a bunch!