0mega_z3ll

Untitled

Feb 18th, 2018
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.omega_zell.minecraftplus.Block;
  2.  
  3. import fr.omega_zell.minecraftplus.MinecraftPlus;
  4. import net.minecraft.block.Block;
  5. import net.minecraft.block.material.Material;
  6. import net.minecraft.client.resources.model.ModelResourceLocation;
  7. import net.minecraft.creativetab.CreativeTabs;
  8. import net.minecraft.init.Blocks;
  9. import net.minecraft.item.Item;
  10. import net.minecraftforge.client.model.ModelLoader;
  11. import net.minecraftforge.fml.common.registry.GameRegistry;
  12. import net.minecraftforge.fml.relauncher.Side;
  13. import net.minecraftforge.fml.relauncher.SideOnly;
  14.  
  15. public class Mpblocks
  16. {
  17. public static final Block COMPOST = new SolFertile(Material.ground).setCreativeTab(CreativeTabs.tabBlock).setHardness(5.0F).setResistance(20.0F).setUnlocalizedName("compost_block");
  18.  
  19. public static void registerBlocks()
  20. {
  21. GameRegistry.registerBlock(COMPOST, "compost_block");
  22. }
  23.  
  24. @SideOnly(Side.CLIENT)
  25. public static void registerBlocksModels()
  26. {
  27. ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(COMPOST), 0, new ModelResourceLocation(MinecraftPlus.MODID + ":compost_block", "inventory"));
  28. }
  29. }
RAW Paste Data