Record Class ToppingDoughIngredient
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.ingredient.ToppingDoughIngredient
- All Implemented Interfaces:
DoughIngredient,IAdvancedIngredient<DoughData>,ITypelessAdvancedIngredient<DoughData>,Predicate<DoughData>
public record ToppingDoughIngredient(net.minecraft.core.Holder<IDoughTopping> topping)
extends Record
implements DoughIngredient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ToppingDoughIngredient> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ToppingDoughIngredient> Fields inherited from interface com.petrolpark.compat.create.core.dough.ingredient.DoughIngredient
STRICT_CODEC, STRICT_STREAM_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionToppingDoughIngredient(net.minecraft.core.Holder<IDoughTopping> topping) Creates an instance of aToppingDoughIngredientrecord 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.modifyCounterExamples(Stream<DoughData> counterExampleStacks) Modify an example stack so it does notfulfillthisIAdvancedIngredient.modifyExamples(Stream<DoughData> exampleStacks) Modify an example stack so itfulfillthisIAdvancedIngredient.booleannet.minecraft.core.Holder<IDoughTopping> topping()Returns the value of thetoppingrecord component.final 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<net.minecraft.network.RegistryFriendlyByteBuf,ToppingDoughIngredient> STREAM_CODEC
-
-
Constructor Details
-
ToppingDoughIngredient
Creates an instance of aToppingDoughIngredientrecord class.- Parameters:
topping- the value for thetoppingrecord component
-
-
Method Details
-
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
-
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). -
topping
Returns the value of thetoppingrecord component.- Returns:
- the value of the
toppingrecord component
-