How to Register a Item
To Register an Item you need to use the Register Class and call the RegisterItem Function.
RegisterItem(String name, String Modid, Supplier aNew)¶
1.0.0 1.19.2 yarn Setup Required
This function registers a new Item for Minecraft. Based on the mod loader. it either returns the Object itself or a RegistryObject of the Object.
Parameters:
name
: The Item name (ID).Modid
: The Mod ID of the registrar.aNew
: The supplier that provides the Item instance.
Returns: The registered data.