Jump to content

[solved][1.13.2] how to use forge ore dictionary in recipes?


Recommended Posts

Posted (edited)

The recipes of my mod as used in 1.12.x are not working in 1.13.2.

the recipes are for example

Spoiler

{
  "type": "crafting_shaped",
  "pattern": [
    "  S",
    " - ",
    "N  "
  ],
  "key": {
    "S": {
      "type": "forge:ore_dict",
      "ore": "stone"
    },
    "-":{
      "type": "forge:ore_dict",
      "ore": "stickWood"
    },
    "N":{
      "type": "forge:ore_dict",
      "ore": "nuggetGold"
    }
  },
  "result": {
    "item": "buildhelper:fillwandstone_item"
  }
}

the error message I am receiving for this recipe is

Spoiler

[14:51:35.794] [Server thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe buildhelper:fillwandstone_item
com.google.gson.JsonSyntaxException: Unknown ingredient type: forge:ore_dict
    at net.minecraftforge.common.crafting.CraftingHelper.getIngredient(CraftingHelper.java:216) ~[?:?]
    at net.minecraft.item.crafting.Ingredient.fromJson(Ingredient.java:189) ~[?:?]
    at net.minecraft.item.crafting.ShapedRecipe.deserializeKey(ShapedRecipe.java:259) ~[?:?]
    at net.minecraft.item.crafting.ShapedRecipe.access$000(ShapedRecipe.java:25) ~[?:?]
    at net.minecraft.item.crafting.ShapedRecipe$Serializer.read(ShapedRecipe.java:283) ~[?:?]
    at net.minecraft.item.crafting.ShapedRecipe$Serializer.read(ShapedRecipe.java:279) ~[?:?]
    at net.minecraft.item.crafting.RecipeSerializers.deserialize(RecipeSerializers.java:47) ~[?:?]
    at net.minecraft.item.crafting.RecipeManager.onResourceManagerReload(RecipeManager.java:54) [?:?]
    at net.minecraft.resources.SimpleReloadableResourceManager.triggerReloadListeners(SimpleReloadableResourceManager.java:125) [?:?]
    at net.minecraft.resources.SimpleReloadableResourceManager.reload(SimpleReloadableResourceManager.java:101) [?:?]
    at net.minecraft.server.MinecraftServer.loadDataPacks(MinecraftServer.java:1378) [?:?]
    at net.minecraft.server.MinecraftServer.loadDataPacks(MinecraftServer.java:375) [?:?]
    at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:75) [?:?]
    at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:95) [?:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:549) [?:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]

How should I use the ingredient type in 1.13.2?

Edited by Torojima

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Posted (edited)

yeah, the links are not really helping me, I know them already and my json syntax is good...

Edit: but it probably will help whoever is surfing in from somewhere reading this question :)

 

Anyway, the package net.minecraftforge.oredict has been removed from forge?! That's the reason the old entries are no longer valid. I've changed them all to minecraft items (except a few tags using the forge versions for the metal parts) and now it works.

 

Thus the correct answer would be to use the minecraft items in the recipes in 1.13.x since forge oredict is no longer available.

Edited by Torojima

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Posted
3 hours ago, Torojima said:

yeah, the links are not really helping me, I know them already and my json syntax is good...

Edit: but it probably will help whoever is surfing in from somewhere reading this question :)

 

Anyway, the package net.minecraftforge.oredict has been removed from forge?! That's the reason the old entries are no longer valid. I've changed them all to minecraft items (except a few tags using the forge versions for the metal parts) and now it works.

 

Thus the correct answer would be to use the minecraft items in the recipes in 1.13.x since forge oredict is no longer available.

 

Tags are the replacement for the Ore Dictionary. To my knowledge, every Ore Dictionary entry that was provided by Forge itself has been replaced with a corresponding item tag.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Makes sense :) because I now are using stuff like

"tag": "forge:nuggets/gold" and "tag": "forge:ingots/gold"

instead of formerly

"type": "forge:ore_dict","ore": "nuggetGold" and "type": "forge:ore_dict","ore": "ingotGold"

this is working well of course :D

 

But what I haven't found yet is a substitute for "type": "forge:ore_dict", "ore": "treeSapling", or "type": "forge:ore_dict","ore": "stickWood" so my mod would be able to use all other mods stick or sapling derivatives. I fell back to the minecraft vanilla "item": "minecraft:stick" and "tag": "minecraft:saplings". But now users can only use the vanilla items for the recipes obviously :)

 

The "tag": "forge:stick/wood" didn't do the trick... Is there a list of available forge tags to use. Since you (@Choonster) mentioned the forge oredict items are now probably available as tags, I would like to use them.

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Posted (edited)
4 hours ago, Torojima said:

The "tag": "forge:stick/wood" didn't do the trick... Is there a list of available forge tags to use. Since you (@Choonster) mentioned the forge oredict items are now probably available as tags, I would like to use them.

 

All of the Forge and Vanilla tag JSON files should be visible in the Forge JAR in your IDE. You can see exactly which tags exist and which items they contain.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • 1 year later...
Posted (edited)

The sacred texts! I'm going to be crucified for necro-ing this, but how would one implement "tag": "minecraft:saplings" as a substitute for ore:treeSapling (or another way that includes all modded saplings)? I don't have IDE to refer to, as I'm asking for CraftTweaker rather than mod development. 

Edited by urbanxx001
Posted (edited)
2 hours ago, urbanxx001 said:

The sacred texts! I'm going to be crucified for necro-ing this

No shit. Start your own thread.

2 hours ago, urbanxx001 said:

I don't have IDE to refer to, as I'm asking for CraftTweaker rather than mod development.

Then why are you here and not asking for help where CraftTweaker is the subject? This is the Forge forums, we help people with Forge.

Secondly, with JSON recipes, CraftTweaker is completely unneccessary.

Edited by Draco18s

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.

Posted (edited)

 

Quote

Then why are you here?

Because Forge and CraftTweaker share syntaxI figured it out and it was indeed <tag:minecraft:sapling>. I prefer it over individual JSON files as all the recipes can be stored in one script, which is less daunting for larger modpacks. 

Edited by urbanxx001
  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • that happens every time I enter a new dimension.
    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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