Predicates defined on some namespaces become unparsable starting from version 1.21.5, or 25w10a in particular. It is suspected that the introduction of SNBT operators in 25w10a causes resource locations of specific formats to be interpreted as inline definitions, causing the affected predicates to be considered as illegal.
To highlight this issue, a custom Data Pack was created to test the behavior of predicates and functions under namespaces of various character combinations, such as:
foo_1
foo_.1
1_foo
1.foo
...
The error message while attempting to access the ‘problematic’ predicates through console command is as follows:
Expected Literal (
...edicate ._:bar<--[HERE]
Accessing these predicates through Data Pack functions yield similar results; as seen in game logs:
Failed to load function ._:bar
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Expected literal ( at position 23: ...edicate ._<--[HERE]
Steps to Reproduce
Create a new world on version 1.21.4, with the data pack attached to this bug report installed.
Open command prompt, and type in the following command with a trailing whitespace behind the last character:
/execute if predicate
Use tab-complete to navigate through all currently available predicates. All predicates should appear as valid (i.e. ‘light-blue’ in color).
Repeat Step 1-3 with a world created on version beyond 1.21.5 (more specifically 25w10a). Some predicates should appear as invalid (i.e. 'red' in color) while tab-navigating. Running the command as-is would lead to errors.
Check game logs, all functions referencing the ‘problematic’ predicates failed to load, printing more error messages in the process.
Expected Results
All predicates visible within tab-complete should be legal in both console command and function definition. References to these predicates should not raise any errors.
Actual Results
Some predicates seen in tab-complete entries appeared as illegal, and could not be accessed in either console command or functions. Predicates of legal namespaces now appear as illegal.
Attachments
Comments 5
Dear Timur,
Attached is the command template that I used for testing.
execute if predicate [tab-complete] run function [tab-complete]
Simply replace any [tab-complete]
with tab-complete suggestions.
Here is an example:
execute if predicate ._:bar run function ._:bar
Or simply:
execute if predicate ._:bar
Both examples should lead to the same result.
Can confirm.