Code
package mreyeballs29.decoblocks.block;
import com.sun.xml.internal.bind.v2.schemagen.xmlschema.List;
import mreyeballs29.decoblocks.Constants;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class ColorPorcelain extends Block {
protected ColorPorcelain(Material material, String Name) {
super(material);
this.setBlockTextureName(Constants.TEXTURE_PREFIX + Name);
this.setBlockName(Name);
this.setHardness(1.2F);
this.setResistance(5.0F);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setHarvestLevel("pickaxe", 0);
}
public IIcon[] icons = new IIcon[16];
public void registerBlockIcons(IIconRegister reg) {
for (int i = 0; i < 15; i++) {
this.icons[i] = reg.registerIcon(this.textureName + "_" + i);
}
}
public IIcon getIcon (int side, int meta) {
if (meta > 14) meta = 0;
return this.icons[meta];
}
public int damagedDropped(int oldmeta) {
return oldmeta;
}
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < 15; i++) {
list.add(new ItemStack(item, 1, i));
}
}
}
Display More
The line list.add says it is undefined. list.addHow do you get it to work.