Started by
TheReallyFatChicken
on
Topic category: Help with Minecraft modding (Java Edition)
Is there any way to check what side of a block something is being placed on? For example, making something that can only be placed on the sides of other blocks, or only on the top, etc.
Sorry if I'm phrasing this poorly.
You may want to set the first block to have no rotation, then for the second block which you want to be only placeable on certain sides of the first you can verify if the block at given direction(x+1,x-1,z+1,z-1,y+1 or y-1) is the first block, if not then destroy it and drop it. If you want the first block to have rotation, then set rotation on it but the second will also need to verify which direction is the first block facing(not sure if you can, guess so), it will make the code more complex and you will need to write down all the right possibilities.