KubeJS (Old)

KubeJS (Old)

3M Downloads

Add UtilsWrapper.parseBlockState(), delegating to the same method in UtilsJS

mikerooni opened this issue ยท 3 comments

commented

Describe the feature

UtilsJS.parseBlockState() isn't exposed through UtilsWrapper right now.

It would be good to either have this method in UtilsWrapper as well, or a type wrapper for BlockStates.

Additional info

No response

commented

We have:
BlockStatePredicate
For example, testing if you are stepping on grass block with snow
BlockStatePredicate.of("minecraft:grass_block[snowy=true]").test(event.player.blockStateOn)

what are your use cases?

commented

I need to specifically supply a blockstate to a method call, so a predicate won't do unfortunately.

I mean it's not hard to just load UtilsJS via reflection either, but would be nicer imo to have the method in UtilsWrapper as well.

commented

Added in recent builds