Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

So... I got 2 questions.

First off, for some reason when I make a recipe, I use crafting_shaped or crafting_shapeless, but I get the error "Could not find type modid:crafting_shaped." I tried using forge:crafting_shaped and still had no luck.

 

Also, how would I go about making a recipe combine item A and Item B, and return Item A with different data, if there will be multiple different items that can be used as Item A (Using OreDict). If this is possible ofc

5 hours ago, Big_Bad_E said:

"Could not find type modid:crafting_shaped."

It should be "minecraft:crafting_shaped"

 

5 hours ago, Big_Bad_E said:

Also, how would I go about making a recipe combine item A and Item B, and return Item A with different data

You need your own IRecipe implementation.

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.

  • Author
9 hours ago, Draco18s said:

It should be "minecraft:crafting_shaped"

 

You need your own IRecipe implementation.

I should of tried minecraft:, I am stupid sometimes lol

 

I haven't ever tried making my own IRecipe implementation, but I will try :D

  • Author

Ok so is there any clarification on the different methods?

I am guessing matches boolean is just checking if the inventory is right (like if you put a piece of dirt in the inventory).

I am guessing canFit boolean is if the grid size works for the recipe

what is the difference between getCraftingResult and getRecipeOutput? should I return the same item for both of them?

Just now, Big_Bad_E said:

what is the difference between getCraftingResult and getRecipeOutput? should I return the same item for both of them?

The difference is that one has access to more information. For example, Choonster uses getCraftingResult to determine part of his iron->gold helmet recipe.

Keep in mind you can always extend an existing recipe class as well and override only what you need to.

 

The two things you need to be aware of are:

1) You need a factory that can deserialize the JSON objects into a IRecipe object. This is fairly easy, anything you'd ever want to parse can already be done with a helper object (JsonUtils and CraftingHelper will do 95% of what you need).

2) You need a _factories.json file to tell the game where to find your IRecipe factories.

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.

  • Author
4 minutes ago, Draco18s said:

The difference is that one has access to more information. For example, Choonster uses getCraftingResult to determine part of his iron->gold helmet recipe.

Keep in mind you can always extend an existing recipe class as well and override only what you need to.

 

The two things you need to be aware of are:

1) You need a factory that can deserialize the JSON objects into a IRecipe object. This is fairly easy, anything you'd ever want to parse can already be done with a helper object (JsonUtils and CraftingHelper will do 95% of what you need).

2) You need a _factories.json file to tell the game where to find your IRecipe factories.

Ok, thats the difference.

For what I am trying to do (Base the output off of the inputs) there is not a current recipe type.

One quick question, is there a way to change the texture of the output item from the item's normal texture? Kind of like Tinker's Construct.

 

5 minutes ago, Big_Bad_E said:

One quick question, is there a way to change the texture of the output item from the item's normal texture? Kind of like Tinker's Construct.

TiC items are based on NBT data. You can't change the output's texture/model with a recipe, not unless that model definition already exists and you're modifying the data that describes the item (e.g. you add 1 to the metadata on a wool block to make it cycle colors).

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.

  • Author
1 hour ago, Draco18s said:

TiC items are based on NBT data. You can't change the output's texture/model with a recipe, not unless that model definition already exists and you're modifying the data that describes the item (e.g. you add 1 to the metadata on a wool block to make it cycle colors).

Why can't I use NBT data? with the recipe I just get the type of the item inputted, then make a new ItemStack of the same item. I could easily add some NBT data to it.

How would I use NBT data to change the texture using registered images?

Edited by Big_Bad_E

You CAN use nbt data, but my point is, the item needs to have a custom mesh definition registered to use the nbt data to determine its model. It is not a generic thing you can do to any item. 

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.

  • Author

 

1 minute ago, Draco18s said:

You CAN use nbt data, but my point is, the item needs to have a custom mesh definition registered to use the nbt data to determine its model. It is not a generic thing you can do to any item. 

so basically, it's a pain and too advanced for me?

I'll be fine without it then lol.

Thanks for responding. got answers to everything I wanted to know.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.