Started by
grouchycheese
on
Topic category: Help with Minecraft modding (Java Edition)
Hi! I want to make a textured road decal/block without having to make several different blocks (for ease of use for anyone using my mod), and the way I'm currently going about this is to have an empty asphalt block and a lined asphalt block, the lined block has a top texture that I want to connect to other of the same block like how Redstone does it or how Fence blocks do it (without having it be a fence block), Redstone mainly really. I'm wondering on how I can do this? Or if it is actually possible to do it :P, thanks to anyone replying!
You have to use the blockstates plugin to change the blocks texture and or model.
Check for block at x-1 y z and all others around it etc. Then depending on which blocks are asphalt you modify the blockstate so that they connect. E.g. if you have an asphalt block with 2 either side, x-1 x+1, then you switch the blockstate to the lined variant facing the east/west (x-x axis), depends how your texture is. Switch to north/south (z-z axis) if it's the wrong way around.
Oh, thank you for this! I don't know how I didn't think of using blockstates earlier!