So I've been recently dealing with modding recently and I've done a directional block that looks like this:
It works fine when I place it in the world, and I've decided to make another model for when you place it on a wall:
However I don't seem to be able to make the block face two direction at the same time (e.g. down + east when placed on the ground, and only east when placed on the wall). I've seen the BlockSign class to see what it should look like (since it's exactly what I'm trying to reproduce, except the fact that we can write on it), however I've seen that the sign is tied to a TileEntity ?
My question here is : do I have to use a tileentity for this or can I do it the block way, and if so, how ?
you could add another IProperty to the block, so the block now has FACING and BOTTOM (for example).
You then just need to correctly de/serialize these values to meta, and you need to add that property to your blockstates file as well.
you could add another IProperty to the block, so the block now has FACING and BOTTOM (for example).
You then just need to correctly de/serialize these values to meta, and you need to add that property to your blockstates file as well.
I've tried to do that with the line
public static final PropertyDirection ORIENT = PropertyDirection.create("orient", EnumFacing.Plane.VERTICAL);
Hello,
So I've been recently dealing with modding recently and I've done a directional block that looks like this:
It works fine when I place it in the world, and I've decided to make another model for when you place it on a wall:
However I don't seem to be able to make the block face two direction at the same time (e.g. down + east when placed on the ground, and only east when placed on the wall). I've seen the BlockSign class to see what it should look like (since it's exactly what I'm trying to reproduce, except the fact that we can write on it), however I've seen that the sign is tied to a TileEntity ?
My question here is : do I have to use a tileentity for this or can I do it the block way, and if so, how ?
you could add another IProperty to the block, so the block now has FACING and BOTTOM (for example).
You then just need to correctly de/serialize these values to meta, and you need to add that property to your blockstates file as well.
You need to use a block state and a forge json.
For an example you need to add a "direction" state with type of EnumFacing, than use model rotation in json for each direction case.
I do not have the exact example of this. But this is the closest json I have to what you need.
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.
I've tried to do that with the line
However, when I use the line
the game crashes whenever I place the block. I don't know what to do D:
I've also tried to look in the BlockStates of the torch, and it says at one point "facing=up", saying that facing can be vertical too.
But when I tried to edit the torch BlockStates to look like mine, the torch doesn't get rendered.
What am I doing wrong ?
I now know that I can set "true" or "false" for a direction, but other than that, already done.
Just in case :
Here's my BlockStates : https://pastebin.com/yQhhthHm
Here's my Block class : https://pastebin.com/xYMdgMnd