Posted July 4, 20178 yr package com.yourtinyhero.notenoughthings.blocks; import java.util.Random; import com.yourtinyhero.notenoughthings.NotEnoughThings; import com.yourtinyhero.notenoughthings.Reference; import net.minecraft.block.Block; import net.minecraft.block.BlockBreakable; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockRenderLayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockSoulGlass extends BlockBreakable { public BlockSoulGlass() { super(Material.GLASS, translucent); this.setLightOpacity(5); this.setUnlocalizedName(Reference.NotEnoughThingsBlocks.SOULGLASSBLOCK.getUnlocalizedName()); this.setRegistryName(Reference.NotEnoughThingsBlocks.SOULGLASSBLOCK.getRegistryName()); this.setCreativeTab(NotEnoughThings.tabNotEnoughThings); } @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.TRANSLUCENT; } public boolean isOpaqueCube() { return false; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random random) { return 0; } protected boolean canSilkHarvest() { return true; } public boolean isFullCube() { return false; } public int getRenderBlockPass() { return 1; } } My code above Edited July 4, 20178 yr by KalebCraft // TheCubeCub Better layout
July 4, 20178 yr Which Minecraft version are you using? I'm guessing you're using a version where Block#isOpaqueCube has an IBlockState parameter, which your isOpaqueCube method doesn't. Always annotate override methods with @Override so you get a compilation error when they don't actually override a super method. You should also use your IDE to auto-generate override methods with the correct signature and annotation. In future, please post code using a code block (the <> icon) or on Gist/Pastebin. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
July 4, 20178 yr Author I'm using 1.11.2, What is an IBlockState parameter? P.S. Thanks for the fast reply
July 4, 20178 yr 10 minutes ago, KalebCraft // TheCubeCub said: What is an IBlockState parameter? Do you know what a parameter is? This is a basic Java concept. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
July 4, 20178 yr Author Not really... I'm kinda new to modding, I've done some basic 1.7.10 modding ages ago, but yeah. Pretty new.
July 4, 20178 yr 13 minutes ago, KalebCraft // TheCubeCub said: Not really... I'm kinda new to modding, I've done some basic 1.7.10 modding ages ago, but yeah. Pretty new. You need to have a solid understanding of Java before making a mod. As it says in this section's description, we're not here to help with basic Java problems. Java has a tutorial on parameters here. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.