-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add Smelting Recipes #3141
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
Add Smelting Recipes #3141
Conversation
You included the |
Fixed. |
Maybe you should stick that 200 in a static constant to avoid differences between furnace / itemstack's default when the default duration ever changes. |
Would it really change? And if it does, the patch in |
Any reason this is stored in the item? It prevents someone from adding a custom recipe for a vanilla item that is a different length than normal (eg, smelting obsidian into x taking 1000 ticks). I would personally use a stack based map for this kinda like what is used for the furnace XP. Just add an additional function to the GameRegistry that sets the cook time (with the other furnace recipe functions) and pull that value for the cook time (or 200 if unset) |
I'm a bit worried about this. |
I definitely don't see why the burn time would go into the recipe. That would mean all recipes would need to know about all possible fuels? That doesn't solve the problem. |
@diesieben07 I do like Lex's idea more for versatility - and can't getBurnTime simply query the item's "default cook time" in doubt? |
I was being stupid and didn't remember what my own PR was about (it was 2 am in my defense). |
a67c653
to
6d2b5b9
Compare
Updated as per the suggestions to now be a generic smelting recipe registry. |
cabe1cb
to
9fad05b
Compare
just a curious question, could that system be extended to cover all processing recipes (e.g. smelting, macerating, alloy smelting, ...) in a generic way? |
@williewillus added labels [Feature] |
Does this have any chance at being accepted soon? Just wondering, since I'm holding off on updating one of my mods in hopes to include custom smelting times. |
NEVER hold off updating normal mods waiting on a PR, who knows if this will actually ever get in. |
The updates will have to wait for a few days, my laptop (only proper computer I have) is currently in repair and the netbook I am using right now is lagging behind updating the screen as I type this text... So yeah, not going to run an IDE on this. |
* @param input the input stack | ||
* @return the raw output stack | ||
*/ | ||
protected abstract ItemStack getOutput0(ItemStack input); |
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.
Maybe a name like 'getRawOutput' would fit better here. Generally i dislike method names with numbers suffixed in public api. Adding to that, i can't really come up with a case where the recipe input does not match, but still wants to generate output. Maybe drop this method and make the normal 'getOutput' method do that?
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.
This method / mechanic is mostly a relic from my original implementation of the vanilla recipes where I did not want to implement the whole "search through the list" thing twice but also did not want to execute it twice when looking up recipes (first check matches
then check getOutput
, both of which would need to traverse the whole list).
But since Lex suggested splitting the vanilla recipes up anyways I will adjust all this as soon as I have my PC back.
Any update on this? I am mainly interested in the ability to make a furnace recipe use NBT to determine the NBT of the output |
Computer and other troubles have kept me from updating this. Soon™. |
How about experience rewards? |
@liach MC grants experience when you pick up the items, using |
It seems that currently item exp is handled by item instances. |
Yes, and since it's just the item's exp * stack size, it is all computed on the fly, when you pick up from the slot. Moving this to the recipe would require adding an "accumulated xp" to the furnace, which is way outside the scope of the PR. |
Any update on this? |
Updating to 1.11.x as we speak, new PR incoming. |
Allows items to specify how long they take to cook in a furnace.