Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.amoddev.mysticalkelpmod;
- import com.amoddev.mysticalkelpmod.util.BlockRegistryHandler;
- import com.amoddev.mysticalkelpmod.util.ItemRegistryHandler;
- import net.minecraft.item.ItemGroup;
- import net.minecraft.item.ItemStack;
- import net.minecraftforge.common.MinecraftForge;
- import net.minecraftforge.eventbus.api.SubscribeEvent;
- import net.minecraftforge.fml.common.Mod;
- import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
- import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
- import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
- import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
- import org.apache.logging.log4j.LogManager;
- import org.apache.logging.log4j.Logger;
- // The value here should match an entry in the META-INF/mods.toml file
- @Mod("mystkm")
- public class MysticalKelpMod
- {
- private static final Logger LOGGER = LogManager.getLogger();
- public static final String MOD_ID = "mystkm";
- public MysticalKelpMod() {
- // Register the setup method for modloading
- FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
- // Register the doClientStuff method for modloading
- FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
- ItemRegistryHandler.init();
- BlockRegistryHandler.init();
- // Register ourselves for server and other game events we are interested in
- MinecraftForge.EVENT_BUS.register(this);
- }
- private void setup(final FMLCommonSetupEvent event) {
- }
- private void doClientStuff(final FMLClientSetupEvent event) {
- }
- public static final ItemGroup TAB = new ItemGroup("mysticalKelpModTab") {
- @Override
- public ItemStack createIcon() {
- return new ItemStack(ItemRegistryHandler.OPAL.get());
- }
- };
- // You can use SubscribeEvent and let the Event Bus discover methods to call
- @SubscribeEvent
- public void onServerStarting(FMLServerStartingEvent event) {
- }
- // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
- // Event bus for receiving Registry Events)
- @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
- public static class RegistryEvents {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement