Hello there!
My name is Eric, and this is my first post on the forums.
I am creating my first mod for Minecraft, and I am starting in Minecraft 1.8.9, because I can find a lot of resources on it (plus I don't really like the new combat).
I am attempting to add a texture to my block I've created. The block loads into the game just fine, but the setBlockTextureName() method errors with "undefined".
Here is my code for my block's class:
package com.xand.xandmod.blocks;
import com.xand.xandmod.XandMod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class CompCobbleI extends Block {
String name = "compcobblei";
public CompCobbleI() {
super(Material.rock);
setUnlocalizedName(XandMod.MODID + "_" + name);
setCreativeTab(CreativeTabs.tabBlock);
setBlockTextureName(XandMod.MODID + "_" + name); //My error is here, not with the string inside, but with the method name itself.
}
}
Ive read other topics about it but cannot find a correct answer. Any help is appreciated!
Thank you,
-Eric