KubeJS (Old)

KubeJS (Old)

3M Downloads

Cardinal block type does not automatically rotate

ChiefArug opened this issue ยท 0 comments

commented

Minecraft Version

1.19.2+

KubeJS Version

Rhino Version

Architectury Version

Forge/Fabric Version

Describe your issue

It is missing overrides for the rotate and mirror methods so that it automatically rotates and mirrors for structure blocks and Create contraptions. Forgot to add that when I made it originally. As a temporary fix you can add

  .rotateState(ctx => ctx.set(BlockProperties.HORIZONTAL_FACING, ctx.rotate(ctx.get(BlockProperties.HORIZONTAL_FACING))))
  .mirrorState(ctx => ctx.set(BlockProperties.HORIZONTAL_FACING, ctx.mirror(ctx.get(BlockProperties.HORIZONTAL_FACING))))

to your custom block.

Note that if a callback is manually set then that should probably be preferred, so doing a null check on that, and if its not null the delegating to super is a good idea.

Crash report/logs

No response