Posted October 15, 20169 yr I'm updating my multiblock file. When complete, the blocks all turn invisible and an obj loads. Except it doesn't. Passing in another block model instead also returns nothing. Commenting out or removing the code that makes it invisible has no effect, and the block still turns invisible. In fact, I removed #shouldSideBeRendered and the ground is still rendered through the block. Odd. package keegan.labstuff.blocks; import keegan.labstuff.tileentity.TileEntityIndustrialMotorContact; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.properties.*; import net.minecraft.block.state.*; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.world.*; public class BlockIndustrialMotorContact extends Block implements ITileEntityProvider { public static final PropertyBool VISIBLE = PropertyBool.create("visible"); @Override public BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[]{VISIBLE}); } public BlockIndustrialMotorContact(Material p_i45394_1_) { super(p_i45394_1_); setDefaultState(getDefaultState().withProperty(VISIBLE, true)); } // @Override // public boolean isOpaqueCube(IBlockState state) // { // return state.getValue(VISIBLE); // // } @Override public int getMetaFromState(IBlockState state) { return (state.getValue(VISIBLE) ? 1 : 0); } @Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(VISIBLE, meta > 0); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { // TODO Auto-generated method stub return new TileEntityIndustrialMotorContact(); } } { "forge_marker":1, "defaults": { "model":"labstuff:blockimotorcontact" }, "variants": { "visible": { "true":{"model":"labstuff:blockimotor"}, "false":{} } } } [shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]
October 15, 20169 yr Author Attention all. I have realized that I was turning them all into motor shafts, thus why my edits to the contact code had no effect. [shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]
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.