Jump to content

Recommended Posts

Posted (edited)

Hello.

I have a tile entity that looks for json crafting recipes like the furnace does, but it won't work. The function in my tile entity

IRecipe irecipe = this.world.getRecipeManager().getRecipe(new RecipeWrapper(this.inv, 0, 0), this.world, SoulMagic.SOUL_INFUSING_TYPE);

is returning null no matter what the items in the inventory are. I found the method in TileEntityFurnace.java, and I am using an item capability. (I need the RecipeWrapper to "wrap" it from capabilities to IInventory).

TileEntitySoulInfuser:

  Reveal hidden contents

I have all the conditionals met and it spams "null" in my terminal.

SoulMagic: (My main mod java class)

  Reveal hidden contents

I don't know where else to put it, I couldn't find an event for it easily.

SoulInfuserRecipe and SoulInfuserRecipe.Serializer:

  Reveal hidden contents

As stated, the json is being imported correctly.

flaming_touch.json

  Reveal hidden contents

What the tileentity does is it adds something (a "spell") to another item's capability in the tileentity. That's why there's going to be no real "output". the "output" is the spell that the tileentity will add if there is a "recipe". I want json support with my mod. I don't know if my logic here is good or not.

I have forge 1.13.2-25.0.215. I don't have github quite yet.

 

Edit: I have tried to make the recipe wrapper an instance variable only created once, but that still doesn't work.

Edited by RainbowLuigi281

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.

Announcements



×
×
  • Create New...

Important Information

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