I have a block with part of it transparent, but the transparent part shows as white. I saw a topic about this and the solution was to put
getBlockLayer(IBlockState state)
but it gives an error: "The method getBlockLayer(IBlockState) of type JarBlock must override or implement a supertype method"
JarBlock class (the class with the problem)
package bigpapa.mod.blocks;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumBlockRenderType;
public class JarBlock extends BlockBase {
public JarBlock(String name, Material materialIn) {
super(name, materialIn);
setSoundType(SoundType.GLASS);
setHardness(1F);
setResistance(15000000F);
setHarvestLevel("pickaxe", 1);
}
@Override
public boolean isFullCube(IBlockState state) {
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state) { //error here
return false;
}
}
BlockBase class
package bigpapa.mod.blocks;
import bigpapa.mod.Main;
import bigpapa.mod.init.ModBlocks;
import bigpapa.mod.init.ModItems;
import bigpapa.mod.util.IHasModel;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.BlockRenderLayer;
public class BlockBase extends Block implements IHasModel {
public BlockBase(String name, Material materialIn) {
super(materialIn);
setUnlocalizedName(name);
setRegistryName(name);
setCreativeTab(CreativeTabs.MATERIALS);
ModBlocks.BLOCKS.add(this);
ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
}
@Override
public void registerModels() {
Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
}
}
Thanks