-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting generated MetaItem's as an IItemStack #1352
Conversation
…m oredicts, but without the oredict. Would be great for outputting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please be more descriptive in PR opening comment and provide some real use cases.
As I am not that familiar with this matter provided information does not say much to me.
This would allow for all Metaitems that gregtech generates to be gotten in an IItemStack form that doesn't have to rely on getting the first in oredict. There is probably some more things I could make smoother. If you really don't care for the material based generation items being in this, I could just remove that part. The old system looped everytime the bracket was called and very inefficient. |
An example would be, RecipeMap.getByName("macerator").recipeBuilder()
.inputs([<ore:ingotSteel>])
.outputs(<metaitem:ingotSteel>)
.duration(60)
.EUt(30)
.buildAndRegister();
vs
RecipeMap.getByName("macerator").recipeBuilder()
.inputs([<ore:ingotSteel>])
.outputs(<ore:ingotSteel>.firstItem)
.duration(60)
.EUt(30)
.buildAndRegister(); It's almost the same, but the metaitem bracket handler guarantee's that it'll be GTCE ingot, only if it's generated by GTCE, else just use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work updating PR. There is one thing that need to be resolved everything else seems reasonable.
src/main/java/gregtech/api/recipes/crafttweaker/MetaItemBracketHandler.java
Outdated
Show resolved
Hide resolved
Believe this should be finished, now that common is out of api area. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for finishing this up.
What:
This would allow you to get material generated IItemStack's through the bracket handler, and would make looping over MetaItem's everytime not a thing. Also somewhat related to #1335
So the bracket handler could also accept the oreDict name, for example,
<metaitem:plateIron>