Posted November 27, 20168 yr I am creating a new block that has the height and width of a Trapdoor. However, for some reason, when I place down the block, all side of the block is was placing on, are see through as if I was spectating or was using x-ray and can see through the block. Here is a link to a screenshot I took: Also, here is a link to my code: https://github.com/needoriginalname/bitsandpieces/blob/master/src/main/java/com/needoriginalname/bitsandpieces/blocks/BlockItemGate.java Any thing I am missing, I feel its something very obvious for non-full blocks but this is my first time making such a block.
November 27, 20168 yr Override the isOpaqueCube method to return false. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
November 27, 20168 yr Author I am using Minecraft 1.10 (forgot to add that) Putting isOpaqueCube to false does seem to fix things being see-through. However, problem now seems to be lighting and also just found out entities can suffocate in it. I checked the bounding box and collision box, its correct. PS: image was updated as of 1:30 est because showed wrong pic
November 27, 20168 yr I believe they are getting rid of anything that looks like this too: import javax.annotation.Nullable; but I don't see @nullable anywhere in the class BlockItemGate.java Removing that is a good thing too. Here is an example of a block that is like glass, is solid, but does not swiss cheese, it extends the BlockBreakable class. public class example_portal_block extends BlockBreakable { public example_portal_block() { super(Material.ROCK, isFullCube(true), MapColor.AIR); setUnlocalizedName(Reference.EBlocks.exampleblock.getUnlocalizedName()); setRegistryName(Reference.EBlocks.exampleblock.getRegistryName()); this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); } public static boolean isFullCube(boolean B) { return true; } public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.TRANSLUCENT; } public boolean blocksLight() { return false; } public boolean isSolid() { return false; } public MapColor getMapColor(IBlockState state) { return MapColor.AIR; } public boolean isOpaqueCube() { return false; } Here is another example that swiss cheeses, it extends block: public class example_block extends Block { public example_portal_block() { super(Material.ROCK); setUnlocalizedName(Reference.EBlocks.exampleblock.getUnlocalizedName()); setRegistryName(Reference.EBlocks.exampleblock.getRegistryName()); this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); } public static boolean isFullCube() { return true; } public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.TRANSLUCENT; } public boolean blocksLight() { return false; } public boolean isSolid() { return false; } public MapColor getMapColor(IBlockState state) { return MapColor.AIR; } }
November 27, 20168 yr I am using Minecraft 1.10 (forgot to add that) Putting isOpaqueCube to false does seem to fix things being see-through. However, problem now seems to be lighting and also just found out entities can suffocate in it. I checked the bounding box and collision box, its correct. PS: image was updated as of 1:30 est because showed wrong pic Try overriding public boolean isFullCube(IBlockState state) { return false; }
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.