Posted September 21, 20169 yr So, I'm making a block that based on different values, it changes the bounding box. The idea is a block that starts with just a center cube of 6x6x6 and each time it has a neighbour block to conect to on some side it adds a cube to connect to the block next to it. I came with this, but not sure if it's a good idea, or if it should be done in a different way. Pixel is: final static double PIXEL = 1D/16D; state = state.getActualState(source, pos); double initX = 5*PIXEL; double initY = 5*PIXEL; double initZ = 5*PIXEL; double finalX = 11*PIXEL; double finalY = 11*PIXEL; double finalZ = 11*PIXEL; if (((Boolean)state.getValue(UP)).booleanValue()){ finalY = 16*PIXEL; } if (((Boolean)state.getValue(DOWN)).booleanValue()){ initY = 0*PIXEL; } if (((Boolean)state.getValue(NORTH)).booleanValue()){ initZ = 0*PIXEL; } if (((Boolean)state.getValue(SOUTH)).booleanValue()){ finalZ = 16*PIXEL; } if (((Boolean)state.getValue(EAST)).booleanValue()){ finalX = 16*PIXEL; } if (((Boolean)state.getValue(WEST)).booleanValue()){ initX = 0*PIXEL; } return new AxisAlignedBB(initX, initY, initZ, finalX, finalY, finalZ); If you need a more graphical representation of what this block looks like let me know.
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.