Package com.hbm_m.recipe
Record Class MixerRecipes.MixerRecipe
java.lang.Object
java.lang.Record
com.hbm_m.recipe.MixerRecipes.MixerRecipe
- Enclosing class:
- MixerRecipes
public static record MixerRecipes.MixerRecipe(net.minecraft.world.level.material.Fluid inputA, int amountA, net.minecraft.world.level.material.Fluid inputB, int amountB, net.minecraft.world.level.material.Fluid output, int outputAmount, int duration, long energyPerTick)
extends Record
Single mixer recipe: two input fluids (in any tank order) combine into one output fluid.
-
Constructor Summary
ConstructorsConstructorDescriptionMixerRecipe(net.minecraft.world.level.material.Fluid inputA, int amountA, net.minecraft.world.level.material.Fluid inputB, int amountB, net.minecraft.world.level.material.Fluid output, int outputAmount, int duration, long energyPerTick) Creates an instance of aMixerReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamountA()Returns the value of theamountArecord component.intamountB()Returns the value of theamountBrecord component.intduration()Returns the value of thedurationrecord component.longReturns the value of theenergyPerTickrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.material.FluidinputA()Returns the value of theinputArecord component.net.minecraft.world.level.material.FluidinputB()Returns the value of theinputBrecord component.booleanisDirectOrder(net.minecraft.world.level.material.Fluid tankA) Returns true iftankAcorresponds toinputA(i.e. tanks are NOT swapped relative to this recipe's declaration order).booleanmatches(net.minecraft.world.level.material.Fluid tankA, net.minecraft.world.level.material.Fluid tankB) Returns true if the given pair of fluids matches this recipe in either tank order.net.minecraft.world.level.material.Fluidoutput()Returns the value of theoutputrecord component.intReturns the value of theoutputAmountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MixerRecipe
public MixerRecipe(net.minecraft.world.level.material.Fluid inputA, int amountA, net.minecraft.world.level.material.Fluid inputB, int amountB, net.minecraft.world.level.material.Fluid output, int outputAmount, int duration, long energyPerTick) Creates an instance of aMixerReciperecord class.- Parameters:
inputA- the value for theinputArecord componentamountA- the value for theamountArecord componentinputB- the value for theinputBrecord componentamountB- the value for theamountBrecord componentoutput- the value for theoutputrecord componentoutputAmount- the value for theoutputAmountrecord componentduration- the value for thedurationrecord componentenergyPerTick- the value for theenergyPerTickrecord component
-
-
Method Details
-
matches
public boolean matches(net.minecraft.world.level.material.Fluid tankA, net.minecraft.world.level.material.Fluid tankB) Returns true if the given pair of fluids matches this recipe in either tank order. -
isDirectOrder
public boolean isDirectOrder(net.minecraft.world.level.material.Fluid tankA) Returns true iftankAcorresponds toinputA(i.e. tanks are NOT swapped relative to this recipe's declaration order). Used to determine which tank to drain by which amount. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
inputA
public net.minecraft.world.level.material.Fluid inputA()Returns the value of theinputArecord component.- Returns:
- the value of the
inputArecord component
-
amountA
public int amountA()Returns the value of theamountArecord component.- Returns:
- the value of the
amountArecord component
-
inputB
public net.minecraft.world.level.material.Fluid inputB()Returns the value of theinputBrecord component.- Returns:
- the value of the
inputBrecord component
-
amountB
public int amountB()Returns the value of theamountBrecord component.- Returns:
- the value of the
amountBrecord component
-
output
public net.minecraft.world.level.material.Fluid output()Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
outputAmount
public int outputAmount()Returns the value of theoutputAmountrecord component.- Returns:
- the value of the
outputAmountrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
energyPerTick
public long energyPerTick()Returns the value of theenergyPerTickrecord component.- Returns:
- the value of the
energyPerTickrecord component
-