Posted September 25, 20178 yr So, I've implemented sideways-slabs, and I'm trying to add a outer/inner corner effect on them, just like stairs have. I'm having a few problems with collisionBoxes, but that's beside the point for now. Now, my problem: For some reason, I get this error, when placing a sideways-double-slab: java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=position, clazz=class com.bte.mod.block.BlockSlabVerticalBase$EnumPosition, values=[north, south, east, west]} as it does not exist in BlockStateContainer{block=bte:smoothstone_vertical_doubleslab, properties=[]} at net.minecraft.block.state.BlockStateContainer$StateImplementation.getValue(BlockStateContainer.java:204) at com.bte.mod.block.BlockSlabVerticalBase.getPaneShape(BlockSlabVerticalBase.java:134) at com.bte.mod.block.BlockSlabVerticalBase.getActualState(BlockSlabVerticalBase.java:122) Which makes NO sense, since this is what the code looks like in BlockSlabVerticalBase.getActualState(): public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) { if(isDouble()) { return state; } else { return state.withProperty(SHAPE, getPaneShape(state, worldIn, pos)); } } For some reason, the instance of bte:smoothstone_vertical_doubleslab seems to return isDouble() as false, even though it's class has: @Override public boolean isDouble() { return true; } I'm going insane trying to figure out why this is happening... All my code is available on https://github.com/44tim44/BetterThanElectricity in case you want to check on anything. Any help at all would be tremendously appreciated! Edited September 26, 20178 yr by 44tim44 Updated link to new repo
September 26, 20178 yr Author Yeah, sorry wasn't aware of the package naming conventions. I fixed that, and all the other things you mentioned, except for EntityEntryBuilder. Gonna take a look at that later. I've cleaned up my repo now, and it should compile properly now. Sorry, and thanks! https://github.com/44tim44/BetterThanElectricity Edited September 26, 20178 yr by 44tim44
September 27, 20178 yr Author 18 hours ago, diesieben07 said: The issue are these lines. isBlockPane will return true for any pane block, even double ones. But then you assume they have a POSITION property, which is not true for double ones. That fixed it! I changed is BlockPane to this and now it works! public static boolean isBlockPane(IBlockState state) { return state.getBlock() instanceof BlockSlabVerticalBase && !((BlockSlabVerticalBase) state.getBlock()).isDouble(); } But since I've already started this thread I'm gonna hijack it and ask for help with the collision boxes too. The Vertical Slabs don't have the correct collision boxes. Even though I am overriding addCollisionBoxToList the Vertical Slabs still have "full block" collision boxes. And I have no idea why. Github is up to date.
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.