#Rotateable block not rotating in game

1 messages · Page 1 of 1 (latest)

dapper stump
#

Attached is code for my block. It isn't particularly special. No custom model, just some stuff in the resource pack that I don't think would contribute anything to the problem.
I used the exact code from the Rotatable Blocks tutorial on bedrock.dev wiki. Still doesn't rotate in-game. Where'd I go wrong?

jade tapir
#

You haven't added an event to apply the rotation states.

dapper stump
jade tapir
dapper stump
#

content log error is:

#

"query.block_state" is making use of non-registered block state.

jade tapir
#

What if you don't use traits? Try doing it with minecraft:transformation

#

Use states instead of traits.

dapper stump
#

It still doesn't work

#

Would you like to see my terrain_texture.json, blocks.json, anything from the resourcepack?

#

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.

jade tapir
#

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"
  }
}
opaque charm
#

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

dapper stump
#

seems that the tutorials I've seen are specifically for those blocks with custom geometry.

opaque charm
#

Just make a basic cube geometry and use the material instance component and you should be g2g

dapper stump
#

But material_instances use entries from terrain_texture.json

#

and I'm using animated textures.

opaque charm
#

ah... yeah animated textures are not supported yet for material instances

dapper stump
#

Is there anything I can do to rotate my textures?

opaque charm
#

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?

dapper stump
#

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

opaque charm
#

ah yeah it's not really possible yet sorry

#

definitely make the suggestion though!

dapper stump
#

Thank you guys very much for your help!

opaque charm
#

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)