Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package events;
- import org.apache.logging.log4j.Logger;
- import com.charles.tutorialmod.main;
- import com.charles.tutorialmod.lists.BlockList;
- import com.charles.tutorialmod.lists.ItemLists;
- import com.charles.tutorialmod.objects.blocks.CustomStairsBlock;
- import net.minecraft.block.Block;
- import net.minecraft.block.SlabBlock;
- import net.minecraft.block.SoundType;
- import net.minecraft.block.material.Material;
- import net.minecraft.item.BlockItem;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemGroup;
- import net.minecraft.util.ResourceLocation;
- import net.minecraftforge.event.RegistryEvent;
- import net.minecraftforge.eventbus.api.SubscribeEvent;
- import net.minecraftforge.fml.common.Mod;
- @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
- public class RegistryEvents
- {
- public static final Logger LOGGER = main.LOGGER;
- public static final String MOD_ID = main.MOD_ID;
- @SubscribeEvent
- public static void registerItems(final RegistryEvent.Register<Item> event)
- {
- event.getRegistry().registerAll
- (
- ItemLists.copper_dust = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("copper_dust")),
- ItemLists.copper_fragment = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("copper_fragment")),
- ItemLists.copper_ore = new BlockItem(BlockList.copper_ore, new Item.Properties().group(ItemGroup.MISC)).setRegistryName(BlockList.copper_ore.getRegistryName()),
- ItemLists.tutorial_slab = new BlockItem(BlockList.lime_linoleum, new Item.Properties().group(ItemGroup.MISC)).setRegistryName(BlockList.lime_linoleum.getRegistryName()),
- ItemLists.tutorial_stairs = new BlockItem(BlockList.lime_linoleum, new Item.Properties().group(ItemGroup.MISC)).setRegistryName(BlockList.lime_linoleum.getRegistryName()),
- ItemLists.lime_linoleum = new BlockItem(BlockList.lime_linoleum, new Item.Properties().group(ItemGroup.MISC)).setRegistryName(BlockList.lime_linoleum.getRegistryName())
- );
- }
- @SubscribeEvent
- public static void registerBlocks(final RegistryEvent.Register<Block> event)
- {
- event.getRegistry().registerAll
- (
- BlockList.copper_ore = new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(2.0f).harvestLevel(56).sound(SoundType.STONE)).setRegistryName(location("copper_ore")),
- BlockList.tutorial_slab = new SlabBlock(Block.Properties.from(BlockList.lime_linoleum).hardnessAndResistance(2.0f)).setRegistryName(location("tutorial_slab")),
- BlockList.tutorial_stairs = new CustomStairsBlock(BlockList.lime_linoleum.getDefaultState(), Block.Properties.from(BlockList.lime_linoleum)).setRegistryName(location("tutorial_stairs")),
- BlockList.lime_linoleum = new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(2.0f).sound(SoundType.STONE)).setRegistryName(location("lime_linoleum"))
- );
- }
- public static ResourceLocation location(String Name)
- {
- return new ResourceLocation(MOD_ID, Name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement