Posted October 2, 20195 yr 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
October 2, 20195 yr 4 hours ago, big papa said: getBlockLayer(IBlockState state) but it gives an error: 4 hours ago, big papa said: isOpaqueCube(IBlockState state) { //error here I like how those two methods are different methods. i.e. the thing you said gives an error is not the thing that you are pointing to. isOpaqueCube doesn't exist any more as it has been replaced by getBlockLayer. Also, code style #4. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.