Class CustomItemTranslator
java.lang.Object
org.geysermc.geyser.translator.item.CustomItemTranslator
This is only a separate class for testing purposes so we don't have to load in GeyserImpl in ItemTranslator.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable org.cloudburstmc.protocol.bedrock.data.definitions.ItemDefinitiongetCustomItem(GeyserSession session, int stackSize, org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components, ItemMapping mapping) Looks up whether a Java item is a custom Bedrock item on our end.
-
Method Details
-
getCustomItem
public static @Nullable org.cloudburstmc.protocol.bedrock.data.definitions.ItemDefinition getCustomItem(GeyserSession session, int stackSize, org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components, ItemMapping mapping) Looks up whether a Java item is a custom Bedrock item on our end.- Parameters:
session- the sessionstackSize- the stack sizecomponents- ALL components of the item; not just the patchmapping- the current Bedrock item mapping we have- Returns:
- the custom item definition, or null
-