Origins (Fabric)

Origins (Fabric)

15M Downloads

Conditioned set block block action

latokike opened this issue ยท 3 comments

commented

I was creating a power that checked if the block below the player was in a specified tag, and if it was it would replace it with dirt, on secondary key press. And then I ran into the problem of not being able to set a condition for the set block action.

commented

#220 I'm not sure if this would fix this, but it might.

commented

Yes, exactly what MineRobber9000 said: you can use the origins:if_else action type as a block action, to specify a block condition and a block action to execute if the condition is true (as well as optionally one to execute if the condition is false).

commented

You can already add a conditioned set block action by using origins:if_else. Set condition to your condition and if_action to your set block action.