Skip to content

Instantly share code, notes, and snippets.

@Kaupenjoe
Last active June 15, 2021 14:36
Embed
What would you like to do?
{
"item.tutorialmod.amethyst": "Amethyst"
}
{
"parent": "item/generated",
"textures": {
"layer0": "tutorialmod:item/amethyst"
}
}
public class ModItems {
public static final DeferredRegister<Item> ITEMS =
DeferredRegister.create(ForgeRegistries.ITEMS, TutorialMod.MOD_ID);
public static final RegistryObject<Item> AMETHYST = ITEMS.register("amethyst",
() -> new Item(new Item.Properties().group(ItemGroup.MATERIALS)));
public static void register(IEventBus eventBus) {
ITEMS.register(eventBus);
}
}
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
ModItems.register(eventBus);
eventBus.addListener(this::setup);
// Register the enqueueIMC method for modloading
eventBus.addListener(this::enqueueIMC);
// Register the processIMC method for modloading
eventBus.addListener(this::processIMC);
// Register the doClientStuff method for modloading
eventBus.addListener(this::doClientStuff);
// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment