[Bug]: Can't apply rules on tool component #2
Labels
No labels
Bug
Confirmed
Crash
Documentation
Duplicate
Enhancement
High Priority
Invalid
Mod compatibility
Needs triage
Stale
Won't Fix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
LunaFox/DefaultComponents#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version information
Latest
Expected Behavior
I was trying to add rules in tool component but there is error with "tags". If I'm using "minecraft:dirt" for example, everything works correctly, but with "#" not
Here the file
Actual Behavior
Here the log:
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Not a valid resource location: #minecraft:mineable/pickaxe Non [a-z0-9_.-] character in namespace of location: #minecraft:mineable/pickaxe; Not a valid resource location: #minecraft:incorrect_for_iron_tool Non [a-z0-9_.-] character in namespace of location: #minecraft:incorrect_for_iron_tool missed input: {"minecraft:tool":{"default_mining_speed":25,"damage_per_block":20,"rules":[{"blocks":["#minecraft:incorrect_for_iron_tool"],"correct_for_drops":false},{"blocks":["#minecraft:mineable/pickaxe"],"correct_for_drops":true}]}}Reproduction Steps
Create a file with JSON I sent above
With rules[...]
and without
Maybe I misspelled something
Java version
21.0.4
Additional information
No response
It seems minecraft expects only items in an array, or tags in a simple string
Changing it to use string instead of arrays works perfectly fine
Yay, you the best one!