Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.x7airworker.MysticItems;
- 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;
- public class Blocks extends Block{
- public Blocks(Material material, String unlocalizedName, float hardness, float resistance, float lightLevel, String tool, int harvestlevel) {
- super(material);
- this.setUnlocalizedName(unlocalizedName);
- this.setHardness(hardness);
- this.setResistance(resistance);
- this.setLightLevel(lightLevel);
- this.setHarvestLevel(tool, harvestlevel);
- this.registerTexture(unlocalizedName);
- }
- private void registerTexture(String unlocName) {
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
- .register(Item.getItemFromBlock(this), 0, new ModelResourceLocation("mysticitems:" + unlocName));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement