-
-
Save Kaupenjoe/836124d40fe46ffdadc0c06c4783eca6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"item.tutorialmod.amethyst": "Amethyst" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parent": "item/generated", | |
"textures": { | |
"layer0": "tutorialmod:item/amethyst" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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