Guest User

Untitled

a guest
Jun 15th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. package com.doggie.raremetalsrevised;
  2.  
  3. import com.doggie.raremetalsrevised.enchantments.SmeltingEnchantmentModifier;
  4. import com.doggie.raremetalsrevised.init.Init;
  5.  
  6. import com.doggie.raremetalsrevised.world.gen.CaliforniumGen;
  7. import com.doggie.raremetalsrevised.world.gen.OsmiumGen;
  8. import com.doggie.raremetalsrevised.world.gen.RhodiumGen;
  9. import net.minecraft.item.Item;
  10. import net.minecraft.item.ItemGroup;
  11. import net.minecraft.item.ItemStack;
  12. import net.minecraft.util.ResourceLocation;
  13. import net.minecraftforge.common.MinecraftForge;
  14. import net.minecraftforge.common.loot.GlobalLootModifierSerializer;
  15. import net.minecraftforge.event.RegistryEvent;
  16. import net.minecraftforge.eventbus.api.IEventBus;
  17. import net.minecraftforge.eventbus.api.SubscribeEvent;
  18. import net.minecraftforge.fml.common.Mod;
  19. import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
  20. import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
  21. import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
  22. import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
  23. import net.minecraftforge.registries.IForgeRegistry;
  24. import org.apache.logging.log4j.LogManager;
  25. import org.apache.logging.log4j.Logger;
  26.  
  27. import javax.annotation.Nonnull;
  28.  
  29.  
  30. @Mod("rmr")
  31. public class RareMetalsRevised {
  32.  
  33. // Directly reference a log4j logger.
  34. private static final Logger LOGGER = LogManager.getLogger();
  35. public static final String MOD_ID = "rmr";
  36.  
  37. public static RareMetalsRevised instance;
  38.  
  39. public RareMetalsRevised() {
  40. final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
  41. modEventBus.addListener(this::setup);
  42. Init.ITEMS.register(modEventBus);
  43. Init.BLOCKS.register(modEventBus);
  44.  
  45. instance = this;
  46. MinecraftForge.EVENT_BUS.register(this);
  47. }
  48.  
  49. @SubscribeEvent
  50. public static void onRegisterItems(final RegistryEvent.Register<Item> event) {
  51. final IForgeRegistry<Item> registry = event.getRegistry();
  52.  
  53.  
  54. final Item.Properties properties = new Item.Properties().group(RareMetalsRevised.TAB);
  55.  
  56. }
  57.  
  58.  
  59. @SubscribeEvent
  60. public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<GlobalLootModifierSerializer<?>> event) {
  61.  
  62.  
  63. event.getRegistry().register(new SmeltingEnchantmentModifier.Serializer().setRegistryName(new ResourceLocation(MOD_ID, "smelting")));
  64.  
  65. }
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. private void setup(final FMLCommonSetupEvent event) {
  74. RhodiumGen.generateOre();
  75. CaliforniumGen.generateOre();
  76. OsmiumGen.generateOre();
  77.  
  78. }
  79.  
  80. @SubscribeEvent
  81. public static void onServerStarting(FMLServerStartingEvent event) {
  82.  
  83. }
  84.  
  85. @SubscribeEvent
  86. public static void loadCompleteEvent(FMLLoadCompleteEvent event) {
  87.  
  88. }
  89.  
  90.  
  91.  
  92.  
  93. // Custom ItemGroup TAB
  94.  
  95.  
  96.  
  97.  
  98.  
  99. public static final ItemGroup TAB = new ItemGroup("Rare Metals Revised Tab") {
  100. @Override
  101. public ItemStack createIcon() {
  102. return new ItemStack(Init.RHODIUM_INGOT.get());
  103. }
  104. };
Advertisement
Add Comment
Please, Sign In to add comment