Record Class ThicknessDoughIngredient
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.ingredient.ThicknessDoughIngredient
- All Implemented Interfaces:
DoughIngredient,IAdvancedIngredient<DoughData>,ITypelessAdvancedIngredient<DoughData>,Predicate<DoughData>
public record ThicknessDoughIngredient(float min, float max)
extends Record
implements DoughIngredient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ThicknessDoughIngredient> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, ThicknessDoughIngredient> Fields inherited from interface com.petrolpark.compat.create.core.dough.ingredient.DoughIngredient
STRICT_CODEC, STRICT_STREAM_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionThicknessDoughIngredient(float min, float max) Creates an instance of aThicknessDoughIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCounterDescription(Lang.IndentedTooltipBuilder description) voidaddToDescription(Lang.IndentedTooltipBuilder description) final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.booleanhasMax()booleanhasMin()floatmax()Returns the value of themaxrecord component.floatmin()Returns the value of theminrecord component.modifyCounterExamples(Stream<DoughData> counterExampleStacks) Modify an example stack so it does notfulfillthisIAdvancedIngredient.modifyExamples(Stream<DoughData> exampleStacks) Modify an example stack so itfulfillthisIAdvancedIngredient.booleanfinal StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.petrolpark.compat.create.core.dough.ingredient.DoughIngredient
translate, translateInverse, translateSimpleMethods inherited from interface com.petrolpark.core.recipe.ingredient.advanced.IAdvancedIngredient
simplifyMethods inherited from interface com.petrolpark.core.recipe.ingredient.advanced.ITypelessAdvancedIngredient
checkedCast, streamCounterExamples, streamExamples
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,ThicknessDoughIngredient> STREAM_CODEC
-
-
Constructor Details
-
ThicknessDoughIngredient
public ThicknessDoughIngredient(float min, float max) Creates an instance of aThicknessDoughIngredientrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceDoughIngredient- Specified by:
getTypein interfaceIAdvancedIngredient<DoughData>
-
addToDescription
- Specified by:
addToDescriptionin interfaceITypelessAdvancedIngredient<DoughData>
-
addToCounterDescription
- Specified by:
addToCounterDescriptionin interfaceITypelessAdvancedIngredient<DoughData>
-
test
-
modifyExamples
Description copied from interface:ITypelessAdvancedIngredientModify an example stack so itfulfillthisIAdvancedIngredient.- Specified by:
modifyExamplesin interfaceITypelessAdvancedIngredient<DoughData>- Parameters:
exampleStacks- May be modified- Returns:
- A stack fulfilling this Ingredient, possibly the same object reference, or
nullif that stack can never fulfill this Ingredient
-
modifyCounterExamples
Description copied from interface:ITypelessAdvancedIngredientModify an example stack so it does notfulfillthisIAdvancedIngredient.- Specified by:
modifyCounterExamplesin interfaceITypelessAdvancedIngredient<DoughData>- Parameters:
counterExampleStacks- May be modified- Returns:
- A stack not fulfilling this Ingredient, possibly the same object reference, or
nullif that stack always fulfills this Ingredient
-
hasMin
public boolean hasMin() -
hasMax
public boolean hasMax() -
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. All components in this record class are compared with '=='. -
min
public float min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public float max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-