Advertisement
Guest User

all da code 2

a guest
Jul 30th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. package com.amoddev.mysticalkelpmod;
  2.  
  3. import com.amoddev.mysticalkelpmod.util.BlockRegistryHandler;
  4. import com.amoddev.mysticalkelpmod.util.ItemRegistryHandler;
  5. import net.minecraft.item.ItemGroup;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraftforge.common.MinecraftForge;
  8. import net.minecraftforge.eventbus.api.SubscribeEvent;
  9. import net.minecraftforge.fml.common.Mod;
  10. import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
  11. import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
  12. import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
  13. import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
  14. import org.apache.logging.log4j.LogManager;
  15. import org.apache.logging.log4j.Logger;
  16.  
  17. // The value here should match an entry in the META-INF/mods.toml file
  18. @Mod("mystkm")
  19. public class MysticalKelpMod
  20. {
  21.  
  22. private static final Logger LOGGER = LogManager.getLogger();
  23.  
  24. public static final String MOD_ID = "mystkm";
  25.  
  26. public MysticalKelpMod() {
  27. // Register the setup method for modloading
  28. FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
  29.  
  30. // Register the doClientStuff method for modloading
  31. FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
  32.  
  33. ItemRegistryHandler.init();
  34. BlockRegistryHandler.init();
  35.  
  36. // Register ourselves for server and other game events we are interested in
  37. MinecraftForge.EVENT_BUS.register(this);
  38. }
  39.  
  40. private void setup(final FMLCommonSetupEvent event) {
  41.  
  42. }
  43.  
  44. private void doClientStuff(final FMLClientSetupEvent event) {
  45.  
  46. }
  47.  
  48. public static final ItemGroup TAB = new ItemGroup("mysticalKelpModTab") {
  49. @Override
  50. public ItemStack createIcon() {
  51. return new ItemStack(ItemRegistryHandler.OPAL.get());
  52. }
  53. };
  54.  
  55.  
  56. // You can use SubscribeEvent and let the Event Bus discover methods to call
  57. @SubscribeEvent
  58. public void onServerStarting(FMLServerStartingEvent event) {
  59.  
  60. }
  61.  
  62. // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
  63. // Event bus for receiving Registry Events)
  64. @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
  65. public static class RegistryEvents {
  66.  
  67. }
  68.  
  69.  
  70. }
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement