BLOCK
This commit is contained in:
@@ -16,6 +16,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.slf4j.Logger;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
|
||||
// Very important Comment
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@@ -33,6 +34,7 @@ public class NuggetMod {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
ModItems.register(modEventBus);
|
||||
ModBlocks.register(modEventBus);
|
||||
|
||||
// Register the item to a creative tab
|
||||
modEventBus.addListener(this::addCreative);
|
||||
@@ -49,6 +51,10 @@ public class NuggetMod {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user