-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Chemical stack reunification #8196
Conversation
# Conflicts: # src/api/java/mekanism/api/chemical/BasicChemicalTank.java
src/api/java/mekanism/api/recipes/PressurizedReactionRecipe.java
Dismissed
Show dismissed
Hide dismissed
src/api/java/mekanism/api/recipes/ingredients/chemical/SingleChemicalIngredient.java
Fixed
Show fixed
Hide fixed
src/api/java/mekanism/api/recipes/ingredients/chemical/SingleChemicalIngredient.java
Dismissed
Show dismissed
Hide dismissed
src/api/java/mekanism/api/recipes/ingredients/creator/IChemicalIngredientCreator.java
Fixed
Show fixed
Hide fixed
…e it properly use chemicals now
…add a perTickUsage method to ItemStackChemicalToItemStack recipes
…he fission reactor use a proper MergedTank
case PIGMENT -> MekanismUtils.getScale(prevScale, getPigmentTank()); | ||
case SLURRY -> MekanismUtils.getScale(prevScale, getSlurryTank()); | ||
case CHEMICAL -> MekanismUtils.getScale(prevScale, getChemicalTank()); | ||
//todo shouldn't this use the lowest amount? - Thiakil |
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.
Unsure? My initial thinking was that in general we display the larger number for chemicals in the GUI when the tank is empty. Though technically based on the implementation details of MekanismUtils#getScale, because we pass zero as the stored amount, the passed capacity is effectively ignored.
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.
My initial thinking was that in general we display the larger number for chemicals in the GUI when the tank is empty
but why? its misleading - though I think the capacity should be the same or at least very similar, it causes confusion when they get less than they bargained for
…here we no longer have generics that prevent normal usage
…necessary as it is only for syncing)
…se the chemical each tick
…ification # Conflicts: # src/api/java/mekanism/api/SerializationConstants.java # src/main/java/mekanism/common/tile/component/config/slot/ChemicalSlotInfo.java
throw new EncoderException("Empty Chemicals are not allowed"); | ||
} | ||
BOXED_OPTIONAL_STREAM_CODEC.encode(buffer, chemical); | ||
public static Chemical parseOptional(HolderLookup.Provider lookupProvider, String tag) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
@@ -114,7 +112,7 @@ | |||
* | |||
* @param chemicalProvider Chemical to match | |||
*/ | |||
default INGREDIENT of(IChemicalProvider<CHEMICAL> chemicalProvider) { | |||
default ChemicalIngredient of(IChemicalProvider chemicalProvider) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods Note
Changes proposed in this pull request:
IChemicalHandler
to allow for direct implementation on blocks alongside fluid handling (method clashes)Todo
backcompat loading
other
ItemStackChemicalToItemStackRecipe#perTickUsage
method. Currently is only used by things that are generic to theIC2I
recipe for viewers and mappers, but can't be set on a per recipe basis and giving different values than the default doesn't change the actual behavior of the machines. (This method allows us to further deduplicate some of our code, and is also something that has been requested for some of our recipes that currently are per tick based)