Record Class DoughTypeIngredient
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.ingredient.DoughTypeIngredient
- All Implemented Interfaces:
DoughIngredient,IAdvancedIngredient<DoughData>,ITypelessAdvancedIngredient<DoughData>,Predicate<DoughData>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DoughTypeIngredient> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, DoughTypeIngredient> Fields inherited from interface com.petrolpark.compat.create.core.dough.ingredient.DoughIngredient
STRICT_CODEC, STRICT_STREAM_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionDoughTypeIngredient(IDough dough) Creates an instance of aDoughTypeIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCounterDescription(Lang.IndentedTooltipBuilder description) voidaddToDescription(Lang.IndentedTooltipBuilder description) dough()Returns the value of thedoughrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.modifyExamples(Stream<DoughData> exampleStacks) Modify an example stack so itfulfillthisIAdvancedIngredient.All (or an exemplary subset) of the stacks whichfulfillthisIAdvancedIngredient.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, modifyCounterExamples, streamCounterExamples
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,DoughTypeIngredient> STREAM_CODEC
-
-
Constructor Details
-
DoughTypeIngredient
Creates an instance of aDoughTypeIngredientrecord class.- Parameters:
dough- the value for thedoughrecord component
-
-
Method Details
-
addToDescription
- Specified by:
addToDescriptionin interfaceITypelessAdvancedIngredient<DoughData>
-
addToCounterDescription
- Specified by:
addToCounterDescriptionin interfaceITypelessAdvancedIngredient<DoughData>
-
test
-
streamExamples
Description copied from interface:ITypelessAdvancedIngredientAll (or an exemplary subset) of the stacks whichfulfillthisIAdvancedIngredient. This is not guaranteed to have every possible stack, and should never be used that way.- Specified by:
streamExamplesin interfaceITypelessAdvancedIngredient<DoughData>- Returns:
- Non-
null, potentially empty Stream
-
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
-
getType
- Specified by:
getTypein interfaceDoughIngredient- Specified by:
getTypein interfaceIAdvancedIngredient<DoughData>
-
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 withObjects::equals(Object,Object). -
dough
Returns the value of thedoughrecord component.- Returns:
- the value of the
doughrecord component
-