#Rotateable block not rotating in game
1 messages · Page 1 of 1 (latest)
So, when I use this in game, it doesn't work. My assumption for why is that the event is using set_block_state to set a state which doesn't exist, because minecraft:placement_direction is a trait.
What if you use "cardinal direction" instead of "facing direction"?
content log error is:
"query.block_state" is making use of non-registered block state.
What if you don't use traits? Try doing it with minecraft:transformation
Use states instead of traits.
It still doesn't work
Would you like to see my terrain_texture.json, blocks.json, anything from the resourcepack?
Here are the stuff that could be an issue
But I don't think they are.
Basically, bismuth is a column-shaped block right now
Or at least, it will be until I change it to have texture 1 and two on opposite diagonal sides
The textures for the block are isotropic and animated.
So your block should rotate and also have an animated texture similar to the command block?
I recommend that you look at the command block files and compare them to yours to see if they are correct, here is an example of the command block in blocks.json
{
"sound": "metal",
"textures": {
"down": "command_block_conditional_side",
"east": "command_block_side",
"north": "command_block_front",
"south": "command_block_back",
"up": "command_block_conditional_side",
"west": "command_block_side"
}
}
To use the transformation component you need to add both a geometry and material instance component. You can't use the old method of defining the texture in blocks.json and getting the default cube shape.
Either method of setting the rotation based on the state (trait or events) should work after that, though traits will work outside experimental
Yeah, my block doesn't have any custom geometry at all! It
seems that the tutorials I've seen are specifically for those blocks with custom geometry.
Just make a basic cube geometry and use the material instance component and you should be g2g
But material_instances use entries from terrain_texture.json
and I'm using animated textures.
ah... yeah animated textures are not supported yet for material instances
Is there anything I can do to rotate my textures?
nothing officially recommended that i can think of... you could maybe animate your textures manually by adding a state to your block to cycle through a series of material instance components with a ticking trigger/event
how many variations of textures are in your flipbook?
There are two "sides" of the block, and each of those two textures has 3 flipbook frames
but they're supposed to transition very smoothly.
If it isn't possible yet, though, that's okay
I'll have to take this up with the suggestions discord server
Thank you guys very much for your help!
you could also do your rotations with the on place event but instead of having the state change, make an entirely different block with the defined textures per side rotated (using set_block to change which block is placed)