-
Notifications
You must be signed in to change notification settings - Fork 305
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
Cribs super recipe check #3608
base: master
Are you sure you want to change the base?
Cribs super recipe check #3608
Conversation
…ribs_super_recipe_check
…ribs_super_recipe_check
@lordIcocain can you run spotless |
Done |
…ribs_super_recipe_check
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.
Overall the idea of this PR is good, though the implementation could use refinement
src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/tileentities/machines/IDualInputInventory.java
Outdated
Show resolved
Hide resolved
...main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputME.java
Outdated
Show resolved
Hide resolved
processingLogic.setInputFluids(slot.getFluidInputs()); | ||
processingLogic.setCribsSlotHash(slotHash); | ||
|
||
CheckRecipeResult foundResult = processingLogic.process(); |
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 is optional and you're perfectly ok to ignore; How about making MTEMultiBlockBase
provide API for each multi to insert custom recipe process logic between CRIB and ordinary hatches, so that solidifier multi doesn't need to copy-paste all the logic from parent, just to insert solidifier hatch logic?
…ribs_super_recipe_check
Get pattern inputs
Find recipes in this machine recipe map
Save recipes in processingLogic using HashMap and slot.getHash() as key.
Machine recipe check will search for recipes in Map using slot.getHash() as key then performe recipeCheck for this single recipe.
Should improve endgame bases performance.