[BUG] States on block predicate cannot be null
Aeltumn opened this issue · comments
Aeltumn commented
Library version
1.8.0-24w14a
What module does this bug apply to?
DSL
What happened?
Prepare for me to report a lot of these, sorry!
I'm using the following code to generate a predicate to check a block's type:
block(vec3(0.relativePos, (-1).relativePos, 0.relativePos), io.github.ayfri.kore.arguments.types.resources.block("${team}_concrete"))
And this is being generated:
execute as @a[scores={intro_completed=1..}] at @s if block ~ ~-1 ~ minecraft:magenta_concrete{} run function crossfire:generated_scopes/generated_1990421361
Here because block's states value defaults to mutableMapOf() and
Arguably vanilla should not see magenta_concrete{} and magenta_concrete as different but with the {} the condition fails and it works without the {}.
Might start making PRs out of these if I find a lot of issues.
How can we reproduce this issue?
If you want the full context:
- Go to https://github.com/Aeltumn/realms-maps and clone it.
- Run
./gradlew :crossfire:run
(make sure to use Java 21) - Look at the created pack in
/out
.
Extra information
No response
My issue is not duplicated
- This is not a duplicate
Ayfri commented
Small bug, easy fix, will be fixed in 1.20.5-pre1 !