Skip to content

Fixed hard coding item stacks to 64#51

Merged
Dream-Master merged 5 commits intoGTNewHorizons:masterfrom
Andthehand:master
Feb 25, 2025
Merged

Fixed hard coding item stacks to 64#51
Dream-Master merged 5 commits intoGTNewHorizons:masterfrom
Andthehand:master

Conversation

@Andthehand
Copy link

I tried to fix a bug mentioned in this issue I found that when addItemStackToInventory(craftingResult) is called in ContainerRecipeBook::tryCraft() it returns true meaning it should have added the item to your inventory but is never added somehow?

If someone has any suggestions I am all ears but for now I just fixed a problem with hardcoding specific stack sizes to 64 when you shift clicking an item inside of the cooking table. Now it defaults to the max stack size of the item that you are trying to make. Also removed some redundant code.

@Andthehand
Copy link
Author

Also this is the first time I've worked on any GTNH code so if there's something I'm doing wrong feel free to critique me.

@miozune
Copy link
Member

miozune commented Feb 17, 2025

I couldn't reproduce the mentioned issue. Could you tell me how you did it?

@Andthehand
Copy link
Author

All you need is any gregtech mortar and a stack of raw beef then go into a Cooking table and shift click specifically mince meat and you'll see that it uses all of the ingredients but never gives you any mince meat in return

@miozune
Copy link
Member

miozune commented Feb 17, 2025

Now I can reproduce the issue. However, your patch doesn't fix the issue.
Using debugger, I found that mince meat recipe is backed by custom class ShapelessUniversalRecipe rather than vanilla/Forge ones. This is probably why I can't reproduce the issue with sugar canes -> sugar recipe.

@Andthehand
Copy link
Author

Yes, I never fixed that specific bug since I couldn't figure out the root cause of the issue. Instead I just cleaned up some of the code to feel like I actually did something hoping someone else would have a better idea of how to fix the issue😄.

@miozune
Copy link
Member

miozune commented Feb 17, 2025

Oh I see lol

Copy link
Member

@miozune miozune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run spotlessApply to fix formatting issue.

@miozune
Copy link
Member

miozune commented Feb 17, 2025

Oh FYI I figured out the cause of the issue. There was a recipe to grind mince meat into mince meat, causing loopback GTNewHorizons/NewHorizonsCoreMod#1203

@Andthehand
Copy link
Author

Oh dang that's an annoying bug.

@Dream-Master Dream-Master merged commit 36a85ae into GTNewHorizons:master Feb 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments