Jump to content

remove option in datapacks [1.19.2]


praryboy

Recommended Posts

Hey there, I'm trying to remove stuff from a tag using the "remove" option, but it isn't working for me. Can you tell me what's wrong?
The original item tag json looks like this:

{
  "values": [
    "minecraft:chicken",
    "minecraft:rabbit",
    "#forge:raw_chicken",
    "#forge:raw_rabbit",
    "#forge:bread",
    {
      "id": "simplefarming:raw_chicken_wings",
      "required": false
    },
    {
      "id": "simplefarming:raw_sausage",
      "required": false
    },
    {
      "id": "simplefarming:raw_horse_meat",
      "required": false
    }
  ]
}

and my json looks like this:

{
  "remove": [
    "#forge:bread"
  ],
  "values": []
}

If I put the ["replace":true] entry in there, it does clear out the tag, so I'm pretty sure the file is at least the right name and in the right place. 

Link to comment
Share on other sites

vanilla tags don't support removing single elements, just replacing the whole thing.

I know kubejs has support for removing single elements from tags, but their actual mechanism uses mixins.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

From the Forge Documentation (1.19.2) :
 

Quote

There is also a Forge extension on the Vanilla syntax. You may declare a remove array of the same format as the values array. Any values listed here will be removed from the tag. This acts as a finer grained version of the Vanilla replace option.

Am I misunderstanding what this is supposed to be doing?

Link to comment
Share on other sites

Honestly I don't know what is going on with that.

From what I can tell the code for it only exists as (stale) PR? i.e. it is not currently in Forge.

https://github.com/MinecraftForge/MinecraftForge/pull/9053

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Maybe it got dropped/overlooked at some point during one of Mojang's "great refactorings"?

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

There already is one linked on that PR: https://github.com/MinecraftForge/MinecraftForge/issues/8949

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.