MrDj200

BlockBaseDj

Sep 15th, 2017
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1. package me.mrdj.attractor.blocks;
  2.  
  3. import net.minecraft.block.material.Material;
  4. import net.minecraft.block.Block;
  5. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  6. import net.minecraft.item.Item;
  7. import net.minecraftforge.client.model.ModelLoader;
  8. import net.minecraftforge.fml.relauncher.Side;
  9. import net.minecraftforge.fml.relauncher.SideOnly;
  10.  
  11. /**
  12.  *
  13.  * @author Dj
  14.  */
  15. public class BlockBaseDj extends Block
  16. {    
  17.     public BlockBaseDj(String name, Material materialIn, String modid)
  18.     {
  19.         super(materialIn);
  20.         setUnlocalizedName(modid + "." + name);
  21.         setRegistryName(name);
  22.     }    
  23.    
  24.     @SideOnly(Side.CLIENT)
  25.     public void initModel() {
  26.         ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment