Okay, so i am having troubles with adding in a texture for my block.
This is the code i have for the block:
package com.pavelow.main;
import com.pavelow.lib.RefStrings;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class PavelowOre extends Block {
public PavelowOre (Material material)
{
super(material);
setUnlocalizedName("PavelowOre");
setHardness(4.0f);
setStepSound(Block.soundTypeStone);
setCreativeTab(CreativeTabs.tabBlock);
setHarvestLevel("pickaxe",3);
}
And that works i guess but i think the problem comes down to the main file:
@Mod(modid = RefStrings.MODID , name = RefStrings.NAME, version = RefStrings.VERSION)
public class mainRegistry {
@SidedProxy(clientSide = RefStrings.CLIENTSiDE , serverSide = RefStrings.SERVERSIDE)
public static ServerProxy proxy;
public final static Block PavelowOre = new PavelowOre(Material.rock);
@EventHandler
public static void PreLoad(FMLPreInitializationEvent PreEvent) {
proxy.registerRenderInfo();
GameRegistry.registerBlock(PavelowOre, "PavelowOre");
}
@EventHandler
public static void Load(FMLInitializationEvent event) {
if(event.getSide() == Side.CLIENT)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(PavelowOre), 0, new ModelResourceLocation(RefStrings.MODID + ":" + PavelowOre.getUnlocalizedName().substring(5), "inventory"));
}
I have the json files all in the right place and have the right things in it, but i again i think the problem lies in the main files.