|
| 1 | +package fr.alasdiablo.janoeo.block; |
| 2 | + |
| 3 | +import fr.alasdiablo.janoeo.JANOEO; |
| 4 | +import fr.alasdiablo.janoeo.util.Registries; |
| 5 | +import net.minecraft.block.Block; |
| 6 | +import net.minecraft.item.BlockItem; |
| 7 | +import net.minecraft.item.Item; |
| 8 | +import net.minecraftforge.event.RegistryEvent; |
| 9 | +import net.minecraftforge.eventbus.api.SubscribeEvent; |
| 10 | +import net.minecraftforge.fml.common.Mod; |
| 11 | +import net.minecraftforge.registries.ObjectHolder; |
| 12 | + |
| 13 | +@SuppressWarnings("unused") |
| 14 | +public class NetherOresBlocks { |
| 15 | + |
| 16 | + @ObjectHolder(Registries.MODID + ":" + Registries.ALUMINIUM_NETHER_ORE) |
| 17 | + public static Block ALUMINIUM_NETHER_ORE; |
| 18 | + @ObjectHolder(Registries.MODID + ":" + Registries.COAL_NETHER_ORE) |
| 19 | + public static Block COAL_NETHER_ORE; |
| 20 | + @ObjectHolder(Registries.MODID + ":" + Registries.COPPER_NETHER_ORE) |
| 21 | + public static Block COPPER_NETHER_ORE; |
| 22 | + @ObjectHolder(Registries.MODID + ":" + Registries.DIAMOND_NETHER_ORE) |
| 23 | + public static Block DIAMOND_NETHER_ORE; |
| 24 | + @ObjectHolder(Registries.MODID + ":" + Registries.EMERALD_NETHER_ORE) |
| 25 | + public static Block EMERALD_NETHER_ORE; |
| 26 | + @ObjectHolder(Registries.MODID + ":" + Registries.GOLD_NETHER_ORE) |
| 27 | + public static Block GOLD_NETHER_ORE; |
| 28 | + @ObjectHolder(Registries.MODID + ":" + Registries.IRON_NETHER_ORE) |
| 29 | + public static Block IRON_NETHER_ORE; |
| 30 | + @ObjectHolder(Registries.MODID + ":" + Registries.LAPIS_NETHER_ORE) |
| 31 | + public static Block LAPIS_NETHER_ORE; |
| 32 | + @ObjectHolder(Registries.MODID + ":" + Registries.LEAD_NETHER_ORE) |
| 33 | + public static Block LEAD_NETHER_ORE; |
| 34 | + @ObjectHolder(Registries.MODID + ":" + Registries.REDSTONE_NETHER_ORE) |
| 35 | + public static Block REDSTONE_NETHER_ORE; |
| 36 | + @ObjectHolder(Registries.MODID + ":" + Registries.RUBY_NETHER_ORE) |
| 37 | + public static Block RUBY_NETHER_ORE; |
| 38 | + @ObjectHolder(Registries.MODID + ":" + Registries.SAPPHIRE_NETHER_ORE) |
| 39 | + public static Block SAPPHIRE_NETHER_ORE; |
| 40 | + @ObjectHolder(Registries.MODID + ":" + Registries.SILVER_NETHER_ORE) |
| 41 | + public static Block SILVER_NETHER_ORE; |
| 42 | + @ObjectHolder(Registries.MODID + ":" + Registries.TIN_NETHER_ORE) |
| 43 | + public static Block TIN_NETHER_ORE; |
| 44 | + @ObjectHolder(Registries.MODID + ":" + Registries.URANIUM_NETHER_ORE) |
| 45 | + public static Block URANIUM_NETHER_ORE; |
| 46 | + |
| 47 | + @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) |
| 48 | + public static class RegistryEvents { |
| 49 | + @SubscribeEvent |
| 50 | + public static void onBlocksRegistry(final RegistryEvent.Register<Block> event) { |
| 51 | + event.getRegistry().register(new NetherOre(Registries.ALUMINIUM_NETHER_ORE)); |
| 52 | + event.getRegistry().register(new NetherOre(Registries.COAL_NETHER_ORE)); |
| 53 | + event.getRegistry().register(new NetherOre(Registries.COPPER_NETHER_ORE)); |
| 54 | + event.getRegistry().register(new NetherOre(Registries.DIAMOND_NETHER_ORE)); |
| 55 | + event.getRegistry().register(new NetherOre(Registries.EMERALD_NETHER_ORE)); |
| 56 | + event.getRegistry().register(new NetherOre(Registries.GOLD_NETHER_ORE)); |
| 57 | + event.getRegistry().register(new NetherOre(Registries.IRON_NETHER_ORE)); |
| 58 | + event.getRegistry().register(new NetherOre(Registries.LAPIS_NETHER_ORE)); |
| 59 | + event.getRegistry().register(new NetherOre(Registries.LEAD_NETHER_ORE)); |
| 60 | + event.getRegistry().register(new NetherRedstoneOre(Registries.REDSTONE_NETHER_ORE)); |
| 61 | + event.getRegistry().register(new NetherOre(Registries.RUBY_NETHER_ORE)); |
| 62 | + event.getRegistry().register(new NetherOre(Registries.SAPPHIRE_NETHER_ORE)); |
| 63 | + event.getRegistry().register(new NetherOre(Registries.SILVER_NETHER_ORE)); |
| 64 | + event.getRegistry().register(new NetherOre(Registries.TIN_NETHER_ORE)); |
| 65 | + event.getRegistry().register(new NetherOre(Registries.URANIUM_NETHER_ORE)); |
| 66 | + } |
| 67 | + |
| 68 | + @SubscribeEvent |
| 69 | + public static void onItemsRegistry(final RegistryEvent.Register<Item> event) { |
| 70 | + Item.Properties properties = new Item.Properties().group(JANOEO.setup.janoeoOreGroup); |
| 71 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.ALUMINIUM_NETHER_ORE, properties).setRegistryName(Registries.ALUMINIUM_NETHER_ORE)); |
| 72 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.COAL_NETHER_ORE, properties).setRegistryName(Registries.COAL_NETHER_ORE)); |
| 73 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.COPPER_NETHER_ORE, properties).setRegistryName(Registries.COPPER_NETHER_ORE)); |
| 74 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.DIAMOND_NETHER_ORE, properties).setRegistryName(Registries.DIAMOND_NETHER_ORE)); |
| 75 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.EMERALD_NETHER_ORE, properties).setRegistryName(Registries.EMERALD_NETHER_ORE)); |
| 76 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.GOLD_NETHER_ORE, properties).setRegistryName(Registries.GOLD_NETHER_ORE)); |
| 77 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.IRON_NETHER_ORE, properties).setRegistryName(Registries.IRON_NETHER_ORE)); |
| 78 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.LAPIS_NETHER_ORE, properties).setRegistryName(Registries.LAPIS_NETHER_ORE)); |
| 79 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.LEAD_NETHER_ORE, properties).setRegistryName(Registries.LEAD_NETHER_ORE)); |
| 80 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.REDSTONE_NETHER_ORE, properties).setRegistryName(Registries.REDSTONE_NETHER_ORE)); |
| 81 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.RUBY_NETHER_ORE, properties).setRegistryName(Registries.RUBY_NETHER_ORE)); |
| 82 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.SAPPHIRE_NETHER_ORE, properties).setRegistryName(Registries.SAPPHIRE_NETHER_ORE)); |
| 83 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.SILVER_NETHER_ORE, properties).setRegistryName(Registries.SILVER_NETHER_ORE)); |
| 84 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.TIN_NETHER_ORE, properties).setRegistryName(Registries.TIN_NETHER_ORE)); |
| 85 | + event.getRegistry().register(new BlockItem(NetherOresBlocks.URANIUM_NETHER_ORE, properties).setRegistryName(Registries.URANIUM_NETHER_ORE)); |
| 86 | + } |
| 87 | + } |
| 88 | +} |
0 commit comments