[p]This is my BlockRenderRegister.java file[/p]
package enderthegamer01.dishonoredmod.client.render.blocks;[/p]
import net.minecraft.client.Minecraft;[/p]
import net.minecraft.client.resources.model.ModelResourceLocation;[/p]
public final class BlockRenderRegister {[/p]
public static void registerBlockRenderer(){[/p]
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(enderthegamer01.dishonoredmod.blocks.DishonoredBlocks.TyvianOre, 0, new ModelResourceLocation("dm:Tyvian_Ore", "inventory"));[/p]
}[/p]
}[/p]
For some reason .register(...) is giving me a error saying i need to turn TyvianOre into an item. Please help me fix this![/p]
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item#getItemFromBlock(DishonoredBlocks.TyvianOre, 0, new ModelResourceLocation("dm:Tyvian_Ore", "inventory"));
package enderthegamer01.dishonoredmod.client.render.blocks;[/p]
import net.minecraft.client.Minecraft;[/p] import net.minecraft.client.resources.model.ModelResourceLocation;[/p]
public final class BlockRenderRegister {[/p]
public static void registerBlockRenderer(){[/p]
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(enderthegamer01.dishonoredmod.blocks.DishonoredBlocks.TyvianOre, 0, new ModelResourceLocation("dm:Tyvian_Ore", "inventory"));[/p]
}[/p] }[/p]
For some reason .register(...) is giving me a error saying i need to turn TyvianOre into an item. Please help me fix this![/p]
package enderthegamer01.dishonoredmod.blocks;[/p]
import net.minecraft.block.Block;[/p]
import net.minecraft.item.Item;[/p]
import net.minecraftforge.fml.common.registry.GameRegistry;[/p]
public final class DishonoredBlocks {[/p]
publicstatic Block TyvianOre;[/p]
public static void createBlocks(){[/p]
GameRegistry.registerBlock(TyvianOre = new TyvianOre("Tyvian_Ore"), "Tyvian_Ore");[/p]
}[/p]
}[/p]
and this is my TyvianOre file[/p]
package enderthegamer01.dishonoredmod.blocks;[/p]
import net.minecraft.block.Block;[/p]
import net.minecraft.block.material.Material;[/p]
import net.minecraft.creativetab.CreativeTabs;[/p]
public class TyvianOre extends Block{[/p]
public TyvianOre(String unlocalizedName, Material material, float hardness, float resistance){[/p]
super(material);[/p]
this.setUnlocalizedName("Tyvian_Ore");[/p]
this.setCreativeTab(CreativeTabs.tabBlock);[/p]
this.setHardness(2.5F);[/p]
this.setResistance(10.0F);[/p]
this.setStepSound(soundTypeStone);[/p]
this.setHarvestLevel("pickaxe", 2);[/p]
}[/p]
public TyvianOre(String unlocalizedName, float hardness, float resistance){[/p]
this(unlocalizedName, Material.rock, hardness, resistance);[/p]
}[/p]
public TyvianOre(String unlocalizedName){[/p]
this(unlocalizedName, 2.5F, 10.0F);[/p]
}[/p]
}[/p]
how so?
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item#getItemFromBlock(DishonoredBlocks.TyvianOre, 0, new ModelResourceLocation("dm:Tyvian_Ore", "inventory"));
Like this?