I am trying to rotate a block on placement and am getting the following error:
[ERR] Error while modifying BlockState placement of kubejs:hayrack: dev.latvian.mods.rhino.EcmaError: TypeError: Cannot find function set(net.minecraft.class_2754,java.lang.String) in object Block{kubejs:hayrack}[facing=north].
I am using the following code:
event.create('hayrack').material('metal').hardness(0.5).defaultCutout().defaultTranslucent().property(BlockProperties.HORIZONTAL_FACING).placementState(placement => {placement['set(net.minecraft.class_2754,java.lang.String)'](BlockProperties.HORIZONTAL_FACING, placement.getHorizontalDirection().opposite())})
})```
Any ideas why this is happening?