Tristan Perotti Posted September 11, 2023 Report Posted September 11, 2023 I'm trying to add a new entry to a "texturesByType" object for the flower block. But I believe my patched label is added at the end of the object, after the wildcard. So the pattern matching is selecting the wildcard entry instead of my new one because it matches first. This is my hunch anyway. I was able to work around this by first removing the wildcard label, adding my new texture by type, then replacing the wildcard. Is there a way to specify the order of the new label you are patching into the object?
Spear and Fang Posted September 12, 2023 Report Posted September 12, 2023 (edited) You can't specify the order in this case, so I'm assuming you used this common technique for moving a wildcard out of the way and then putting it back again. The temporary destination path "hax" is just a made up location. It can be any arbitrary name really. You can put your patch first, and then these two patches afterwards. Or put your patch between these two. Either way works. [ { "file": "game:itemtypes/resource/stone.json", "op": "move", "frompath": "/texturesByType/*", "path": "/hax", }, { "file": "game:itemtypes/resource/stone.json", "op": "move", "frompath": "/hax", "path": "/texturesByType/*", } ] Edited September 12, 2023 by Spear and Fang
Tristan Perotti Posted September 12, 2023 Author Report Posted September 12, 2023 @Spear and FangThanks for the reply. I was just deleting and re-applying the wildcard entry, but I like what you suggested in just moving it. Makes it so the patch doesn't have to contain the actual value. Thanks! 1
Recommended Posts