perromercenary00 Posted January 7, 2023 Posted January 7, 2023 (edited) hi good nights im doing a custome toilet block and i need to set the collition boxes for it in four direction but for the explanatory process i only talking about facing nort i have two main collition boxes one for the chair and one for the tank protected static final VoxelShape NB_0 = Block.box( 3.0D, 0.0D, 4.0D, 10.0D, 8.0D, 12.0D); //base chair protected static final VoxelShape NT_0 = Block.box( 1.0D, 7.0D, 0.0D, 14.0D, 9.0D, 4.0D); //water tank i need the base chair part to have a hole in the center soo i made the hole a shape hopping to find a way to just sustract the hole area form the base box and later just joint the tank part like protected static final VoxelShape HOLE = Block.box( 6.0D, 0.0D, 6.0D, 10.0D, 8.0D, 10.0D); //base whit a hole => Shapes.join( NB_0, HOLE, BooleanOp.? ) protected static final VoxelShape caja_n = Shapes.join( Shapes.join( NB_0, HOLE, BooleanOp.? ) ,NT_0 , BooleanOp.OR); //Shapes.join(caja, Y_5_AABB, BooleanOp.OR); soo iwas looking inside the BooleanOp.class net.minecraft.world.phys.shapes.BooleanOp.class an don't get a thing i guest is coze im not a english speaker soo this things dont make sense for me is like here im joining too forms using BooleanOp.OR but that dont make sense, in mi languague that must be a BooleanOp.AND operation soo how i cut the small hole shape from the bigger base chair part ? thanks for you time Edited January 7, 2023 by perromercenary00 Quote
warjort Posted January 7, 2023 Posted January 7, 2023 Look at what the AbstractCauldron or HopperBlock does. Or in general: Shapes.join(original, cutout, ONLY_FIRST); i.e. start with "original" and only takes the parts that are in that shape but not in "cutout". Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
perromercenary00 Posted January 7, 2023 Author Posted January 7, 2023 On 12/29/2022 at 6:06 PM, warjort said: ya thanks that makes the tric works protected static final VoxelShape HOLE = Block.box(6.0D, 0.0D, 6.0D, 10.0D, 8.0D, 10.0D); protected static final VoxelShape caja_n = Shapes.join(Shapes.join(NB_0, HOLE, BooleanOp.ONLY_FIRST), NT_0, BooleanOp.OR); i have curiosity is somewhere explained how to use the other options, some of it just breaks the code and makes minecraft fails saying mi toilet block is null Quote
Recommended Posts
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.