Record Class NotIngredientModifier<STACK>
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.ingredient.modifier.NotIngredientModifier<STACK>
- All Implemented Interfaces:
ITypelessIngredientModifier<STACK>
public record NotIngredientModifier<STACK>(IIngredientModifier<? super STACK> modifier)
extends Record
implements ITypelessIngredientModifier<STACK>
-
Constructor Summary
ConstructorsConstructorDescriptionNotIngredientModifier(IIngredientModifier<? super STACK> modifier) Creates an instance of aNotIngredientModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCounterDescription(List<net.minecraft.network.chat.Component> description) voidaddToDescription(List<net.minecraft.network.chat.Component> description) static final <STACK> com.mojang.serialization.MapCodec<NotIngredientModifier<STACK>> codec(com.mojang.serialization.Codec<IIngredientModifier<? super STACK>> typeCodec) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.IIngredientModifier<? super STACK> modifier()Returns the value of themodifierrecord component.voidmodifyCounterExamples(List<? extends STACK> counterExampleStacks) voidmodifyExamples(List<? extends STACK> exampleStacks) static final <STACK> net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, NotIngredientModifier<STACK>> streamCodec(net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, IIngredientModifier<? super STACK>> typeStreamCodec) booleanfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NotIngredientModifier
Creates an instance of aNotIngredientModifierrecord class.- Parameters:
modifier- the value for themodifierrecord component
-
-
Method Details
-
codec
public static final <STACK> com.mojang.serialization.MapCodec<NotIngredientModifier<STACK>> codec(com.mojang.serialization.Codec<IIngredientModifier<? super STACK>> typeCodec) -
streamCodec
public static final <STACK> net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,NotIngredientModifier<STACK>> streamCodec(net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, IIngredientModifier<? super STACK>> typeStreamCodec) -
test
- Specified by:
testin interfaceITypelessIngredientModifier<STACK>
-
modifyExamples
- Specified by:
modifyExamplesin interfaceITypelessIngredientModifier<STACK>
-
modifyCounterExamples
- Specified by:
modifyCounterExamplesin interfaceITypelessIngredientModifier<STACK>
-
addToDescription
- Specified by:
addToDescriptionin interfaceITypelessIngredientModifier<STACK>
-
addToCounterDescription
- Specified by:
addToCounterDescriptionin interfaceITypelessIngredientModifier<STACK>
-
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). -
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-