Skip to content

Instantly share code, notes, and snippets.

@Kaupenjoe
Last active June 15, 2021 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kaupenjoe/836124d40fe46ffdadc0c06c4783eca6 to your computer and use it in GitHub Desktop.
Save Kaupenjoe/836124d40fe46ffdadc0c06c4783eca6 to your computer and use it in GitHub Desktop.
{
"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