Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package mod.divinity.init;
- import mod.divinity.Reference;
- import mod.divinity.blocks.DivBlocks;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.resources.model.ModelResourceLocation;
- import net.minecraft.item.Item;
- import net.minecraftforge.fml.common.registry.GameRegistry;
- public class DivinityBlocks {
- public static Block tenebrium_ore;
- public static void init() {
- tenebrium_ore = new DivBlocks(Material.rock).setUnlocalizedName("tenebrium_ore");
- }
- public static void register() {
- GameRegistry.registerBlock(tenebrium_ore, tenebrium_ore.getUnlocalizedName().substring(5));
- }
- public static void registerRenders() {
- registerRender(tenebrium_ore);
- }
- public static void registerRender(Block block) {
- Item item = Item.getItemFromBlock(tenebrium_ore);
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement