Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] [SOLVED] Crafting recipe using only vanilla items can not be used
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 2
Nuparu00

[1.12.2] [SOLVED] Crafting recipe using only vanilla items can not be used

By Nuparu00, February 3, 2019 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Nuparu00    1

Nuparu00

Nuparu00    1

  • Tree Puncher
  • Nuparu00
  • Members
  • 1
  • 15 posts
Posted February 3, 2019 (edited)

Hi. I have wanted to add crafting recipes to my blocks/items, but I ran into a problem. If the recipe contains my custom items as ingredients, it works exactly as it should, but when the recipe uses vanilla-only items, it cannot be crafted. The recipe still appears in the "Recipe Book", but no item appears in the output slot. My only idea is that it has something to do with the advancements system, but since nowhere is mentioned anything about that, I don't think that is the case. The game does not throw any error/warning messages to the log, so I am quite clueless. I am using Forge 1.12.2-14.23.3.2676.

 

This does work:

{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    "S"
  ],
  "key": {
    "S": {
      "item": "sevendaystomine:smallrock"
    }
  },
  "result": {
    "item": "sevendaystomine:woodplank"
  }
}

But this for some reason does not:

{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    "S"
  ],
  "key": {
    "S": {
      "item": "minecraft:stick"
    }
  },
  "result": {
    "item": "sevendaystomine:woodplank"
  }
}

 

EDIT: Updating to the recommended Forge 1.12.2-14.23.5.2768 did not help. I have also tried using generated recipes from https://crafting.thedestruc7i0n.ca/ and recipes from a various tutorial on the internet, but basically, as long as some of my items is not an ingredient, the recipe does not work.

 

EDIT 2: So I have found the origin of this all. It is because I have registered my custom IRecipe classes from code, which seems to be not needed. I have removed the code that does this and now it works!

Edited February 7, 2019 by Nuparu00
Solved
  • Quote

Share this post


Link to post
Share on other sites

Cadiboo    365

Cadiboo

Cadiboo    365

  • Reality Controller
  • Cadiboo
  • Members
  • 365
  • 3624 posts
Posted February 4, 2019

Your logs should be telling you the problem, please post them

  • Quote

About Me

Spoiler

My Discord - Cadiboo#8887

My Website - Cadiboo.github.io

My Mods - Cadiboo.github.io/projects

My Tutorials - Cadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Share this post


Link to post
Share on other sites

Nuparu00    1

Nuparu00

Nuparu00    1

  • Tree Puncher
  • Nuparu00
  • Members
  • 1
  • 15 posts
Posted February 4, 2019

The thing is, there seems to be nothing that could be related to this. The only warning messages that are there are about my textures and models: https://pastebin.com/4SxKXjid

 

  • Quote

Share this post


Link to post
Share on other sites

Nuparu00    1

Nuparu00

Nuparu00    1

  • Tree Puncher
  • Nuparu00
  • Members
  • 1
  • 15 posts
Posted February 6, 2019

So I just redownloaded Forge MDK and created a new workspace and tried to make a recipe work in the example mod and it worked - after adding a .json file for a new advancement. But when I tried to replicate this in my actual workspace, it gave the same result as previous attempts. I have also tried using GameRegistry#addShapedRecipe() and RegistryEvent.Register<IRecipe>, but none of these worked at all. I do not know what to do now. I will wait and while and then I guess I have to either create my own recipe system, downgrade to 1.11.x or recreate my workspace.

  • Quote

Share this post


Link to post
Share on other sites

Corey    3

Corey

Corey    3

  • Stone Miner
  • Corey
  • Members
  • 3
  • 58 posts
Posted February 6, 2019

Try using breakpoints to debug and step through the code in your IDE, to find out where it's failing.

  • Quote

Share this post


Link to post
Share on other sites

Nuparu00    1

Nuparu00

Nuparu00    1

  • Tree Puncher
  • Nuparu00
  • Members
  • 1
  • 15 posts
Posted February 6, 2019

Thank you, but there is not basically any place I could do this, as all logic of the registration should be handled by vanilla automatically unless I register it manually. When I tried to do so, I called GameRegistry#addShapedRecipe() from FMLInitializationEvent and I can confirm that it was called as the debug message has been printed + if I passed some non-sense (like a recipe with more than 9 items) actually threw an exception.
I think that the game is aware of the recipe, because the recipe shows in the recipe book, but for some reason the output slot is empty.

  • Quote

Share this post


Link to post
Share on other sites

Nuparu00    1

Nuparu00

Nuparu00    1

  • Tree Puncher
  • Nuparu00
  • Members
  • 1
  • 15 posts
Posted February 7, 2019

Ok. So I have prevented all my code from executing (except the main class of course) and it works, so I have to figure out what exactly causes this.

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 2
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      Forge 1.16.5 - 36.0.9 start up crash

      By diesieben07 · Posted 7 minutes ago

      Problem with RandomPatches.
    • diesieben07
      my 1.16.5 modded game crashes after a while of playing

      By diesieben07 · Posted 8 minutes ago

    • diesieben07
      I need help

      By diesieben07 · Posted 9 minutes ago

      Some zip managers like to take control of the .jar file extension away from Java. Make sure you have Java installed and try running Jarfix once, then try the installer again.
    • diesieben07
      [1.16.5] Enchantments can Apply to all Tools

      By diesieben07 · Posted 11 minutes ago

      https://www.geeksforgeeks.org/how-to-use-iterator-in-java/
    • Zockerbua
      I need help

      By Zockerbua · Posted 16 minutes ago

      I want to download forge for version 1.16.5, but wehn i download forge i get a JAR-File and not the Java-file and when i open this JAR-File i can see the code of the programm i dont know how to fix this please help me.
  • Topics

    • Maxi90909
      3
      Forge 1.16.5 - 36.0.9 start up crash

      By Maxi90909
      Started 1 hour ago

    • matthyit
      3
      my 1.16.5 modded game crashes after a while of playing

      By matthyit
      Started 2 hours ago

    • Zockerbua
      1
      I need help

      By Zockerbua
      Started 16 minutes ago

    • Luis_ST
      17
      [1.16.5] Enchantments can Apply to all Tools

      By Luis_ST
      Started Yesterday at 07:21 AM

    • domi0908
      6
      fix hitbox red baby mobs version forge

      By domi0908
      Started Tuesday at 03:04 PM

  • Who's Online (See full list)

    • gaularn@gmail.com
    • diesieben07
    • Alpvax
    • Stefan2007
    • Tavi007
    • ozi
    • Maxi90909
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] [SOLVED] Crafting recipe using only vanilla items can not be used
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community