mojira.dev

NiceRon

Assigned

No issues.

Reported

MC-277765 Escaping of stored data is not returned Invalid MC-277343 functions defined in load tag list don't run on (re-)load when another load function could not be loaded Awaiting Response MC-276140 Required:false not working in any tag list Duplicate MC-274496 Translation keys for banner patterns Invalid MC-272501 Data Driven Enchantment do not work in predicates Cannot Reproduce

Comments

I'm sorry but how can I add another layer of escaping to a stored value? There isn't really something like data modify storage .. stuff or similliar as far as I'm aware and to expect anybody using the data pack to add that layer of escaping when renaming items in an anvil is simply not an option.

Don't get me wrong, I really do appreciate the help but I still don't see why it's more reasonable for the value which is stored with escaping to remove it apparently before resolving the macro command. 

But maybe we're just still talking different tongues so here's another more detailed example:

Let's say we have an item like the one from this summon command (which can also be just renamed one from a player using an anvil):

/summon item ~ ~ ~ {Item:{id:"minecraft:dirt",count:1,components:{"minecraft:custom_name":'"Pete\'s Dirt"'}}}

and I store the CustomName value with 

/data modify storage test:storage saved_name set from entity @n[type=item] CustomName

then I'm asking for the storage with 

/data get storage test:storage saved_name

this returns the following

Storage test:storage has the following contents: '"Pete\'s Dirt"'

if I then try to use the variable in a function to ask for an item in a players inventory with the same minecraft:custom_name with

$execute as @a if items entity @s container.* minecraft:dirt[minecraft:custom_name='$(saved_name)'] run say success

the command will be executed without the escaping like this:

$execute as @a if items entity @s container.* minecraft:dirt[minecraft:custom_name='"Pete's Dirt"'] run say success

which obviously runs into an error.

I'd expect the stored value to be pasted the same way it is shown to me when I use /data get and not to be formatted further. 

 

Thanks for the explanation. Might be that I understood your comment wrongly but the problem here is not that it stores the value as "Bob\'s Burger" but rather than when using the variable in a macro command it's being pasted as "Bob's Burger" which makes it impossible to set custom names from storage data since the escaping of ' in Bob's Burger is missing (in that example)

Bug persists in 24w39a

Bug persists in 24w38a

Are there any news on this one? If this persists it will prevent us from making a lot of data packs compatible with others.

Bug persists in 24w37a

Bug persists in 24w36a

attached the datapack I am working on. as mentioned above I can not get a positive output when using any custom enchantment as a condition. also tested this a bit further yesterday and it does also effect new enchantments in the minecraft namespace

fixed report as mentioned from automod