Jump to content

[SOLVED][1.14.4] Adding New Global Tags


ShetiPhian

Recommended Posts

At first I thought maybe I was using too old of a Forge build so updated it to 1.14.4-28.2.3

Then I figured maybe something was off in my environment, so I tested with a clean 'examplemod'

 

How does one register a new global tag?

The docs just mention using the forge domain but that doesn't seem to be enough.

I can add to existing tags in the minecraft and forge domains, and I can add new tags to the mods domain, but any new tags outside of the mods domain is unusable in recipes, loot tables and code.

 

Tag "test.json"

{
    "replace": false,
    "values": [
        "minecraft:dead_bush",
        "minecraft:fern"
    ]
}

 

Recipe:

{
    "type": "minecraft:crafting_shapeless",
    "ingredients": [
        {
            "tag": "examplemod:test"
        }
    ],
    "result": {
        "item": "minecraft:dirt"
    }
}

 

With the tag located at "data.examplemod.tags.items" the recipe works.

Moving it to "data.forge.tags.items" and changing the recipe to "forge:test" results in the error "com.google.gson.JsonSyntaxException: Unknown item tag 'forge:test'", and the recipe does not work.

Trying again with the tag at "data.minecraft.tags.items" and updating the recipe causes a similar error "com.google.gson.JsonSyntaxException: Unknown item tag 'minecraft:test'" and again the recipe fails.

Even gave "global", "common" and "c" a try but same issue.

 

So it looks like adding the new json file is only part of the requirements. (and is the only requirement when within your own domain)

Do I need to create and register a TagProvider?

- If so, what happens when more the one mod registers a provider for the same file? (as that would be the case for all mod added provided global tags at multiple mods access)

- If not, what am I missing? or is this ore dictionary feature not yet implemented for tags?

Edited by ShetiPhian
Mark as Solved
Link to comment
Share on other sites

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Thank you, that was just the jump start my brain needed.

While carefully looking over your linked files, and comparing to my test ones, I noticed the dumb mistake in my test work space. a typo in the path ¬¬

 

Knowing without a doubt it does work, I started looking over my main work space, and remembered an issue I had early in 1.12. (resource changes stopped building)

So just like before I deleted the build folder. Now tags added to the forge domain work. 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I am trying to override or disable some vanilla recipes, as part of my mod. All of the methods that I have seen online, so far, do not work. So far, I have tried: Creating a JSON file in the "data/minecraft/recipes" folder, that has air as the ingredient and a barrier as the result This only works for crafting table recipes adding a smelting recipe this way works as intended Editing the ordering to AFTER in the forge dependency inside the "mods.toml" file Found an older post about using the FurnaceRecipe class, that no longer exists From: here So, what is required to disable a vanilla smelting recipe? I know some may say to not do this, but part of the progression of my mod kind of requires disabling some of the furnace recipes. Also, it seems that smelting recipes don't technically have to have the same filename as the block used, r as the result. When overriding crafting recipes, just adding the edited/removed recipe file in the minecraft data folder, under the same name as the original recipe.  Edit: the crafting recipes seem to be cached between worlds? I created a new world and the edited crafting recipes works, but it doesn't work in an already made world?
    • Using a modified version of "Fabulously Optimized" installed a few more mods and now my Hot Bar is invisible... Latest log : https://paste.ee/p/72TSs (No DeBug log txt file.)
    • I know that with this you can return the game folder   FMLPaths.GAMEDIR.get() I want the player to be created in the world where a txt file was created in the folder of the same world. How can I return the path of the world folder that the player is in?
    • [09Jun2023 15:38:56.969] [main/ERROR] [mixin/]: Mixin config dynamiclightsreforged.mixins.json does not specify "minVersion" property [09Jun2023 15:38:57.512] [main/ERROR] [mixin/]: Mixin config itshallnottick.mixins.json does not specify "minVersion" property how do i fix those 2
    • Whoops sorry uploaded wrong logs, here are the correct ones: 09:28:31.876 at java.base/java.lang.Thread.run(Thread.java:833) 09:28:31.876 Caused by: java.lang.UnsupportedOperationException: A mod tried to access the state neighbor table directly. Please report this at https://github.com/malte0811/FerriteCore/issues. As a temporary workaround you can enable "populateNeighborTable" in the FerriteCore config 09:28:31.876 at TRANSFORMER/ferritecore@4.2.2/malte0811.ferritecore.fastmap.table.CrashNeighborTable.crashOnAccess(CrashNeighborTable.java:101) 09:28:31.876 at TRANSFORMER/ferritecore@4.2.2/malte0811.ferritecore.fastmap.table.CrashNeighborTable.rowKeySet(CrashNeighborTable.java:77) 09:28:31.876 at TRANSFORMER/canary@0.2.1/com.abdelaziz.canary.common.state.FastImmutableTable.<init>(FastImmutableTable.java:36) 09:28:31.876 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.state.StateHolder.handler$bbj000$postCreateWithTable(StateHolder.java:531) 09:28:31.876 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.state.StateHolder.m_61133_(StateHolder.java:1052) 09:28:31.876 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.state.StateDefinition.<init>(StateDefinition.java:68) 09:28:31.876 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.state.StateDefinition$Builder.m_61101_(StateDefinition.java:157) 09:28:31.877 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.Block.<init>(Block.java:174) 09:28:31.877 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.AirBlock.<init>(AirBlock.java:12) 09:28:31.877 at TRANSFORMER/minecraft@1.18.2/net.minecraft.world.level.block.Blocks.<clinit>(Blocks.java:40) 09:28:31.877 ... 18 more 09:28:32.435 Process crashed with exit code 1
  • Topics

×
×
  • Create New...

Important Information

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