Add Nugget Mod items, blocks, and recipes

This commit is contained in:
2024-12-15 19:00:19 -06:00
parent bb8c8a2594
commit ab3d75abcf
28 changed files with 364 additions and 10 deletions

View File

@@ -15,6 +15,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.slf4j.Logger;
import xyz.sillyangel.nugget.item.ModCreativeModeTabs;
import xyz.sillyangel.nugget.item.ModItems;
import xyz.sillyangel.nugget.block.ModBlocks;
@@ -33,6 +34,8 @@ public class NuggetMod {
// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
ModCreativeModeTabs.register(modEventBus);
ModItems.register(modEventBus);
ModBlocks.register(modEventBus);
@@ -48,13 +51,7 @@ public class NuggetMod {
// Add the example block item to the building blocks tab
private void addCreative(BuildCreativeModeTabContentsEvent event) {
if (event.getTabKey() == CreativeModeTabs.INGREDIENTS) {
event.accept(ModItems.NUGGET);
}
if (event.getTabKey() == CreativeModeTabs.BUILDING_BLOCKS) {
event.accept(ModBlocks.NUGGET_BLOCK);
event.accept(ModBlocks.RAW_NUGGET_BLOCK);
}
}
// You can use SubscribeEvent and let the Event Bus discover methods to call