I tried buidling a few of these examples (whilst debugging my own script failure to build with custom state strings) as i switched from raw Javascript coding to using typescript.
I found that they failed (same as my own code):
|
if (e.block.permutation.getState("mike_luck:unlucky") === true && Math.random() < 0.5) { |
I found help online and added "as keyof BlockStateSuperset" to the "getState" calls.
Should the examples be updated like this also?
ie.
if (e.block.permutation.getState("mike_luck:unlucky" as keyof BlockStateSuperset ) === true && Math.random() < 0.5) {