Record Class ConditionDamagedAtLeast
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.ingredient.condition.type.ConditionDamagedAtLeast
- All Implemented Interfaces:
IIngredientCondition
@ZenRegister
public record ConditionDamagedAtLeast(int minDamage)
extends Record
implements IIngredientCondition
-
Field Summary
Fields inherited from interface com.blamejared.crafttweaker.api.ingredient.condition.IIngredientCondition
CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionConditionDamagedAtLeast(int minDamage) Creates an instance of aConditionDamagedAtLeastrecord class. -
Method Summary
Modifier and TypeMethodDescriptionPredicate<net.minecraft.core.component.DataComponentType<?>> final booleanIndicates whether some other object is "equal to" this one.getCommandString(String base) final inthashCode()Returns a hash code value for this object.booleanmatches(IItemStack stack) intReturns the value of theminDamagerecord 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.blamejared.crafttweaker.api.ingredient.condition.IIngredientCondition
getType
-
Constructor Details
-
ConditionDamagedAtLeast
public ConditionDamagedAtLeast(int minDamage) Creates an instance of aConditionDamagedAtLeastrecord class.- Parameters:
minDamage- the value for theminDamagerecord component
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceIIngredientCondition
-
componentFilter
- Specified by:
componentFilterin interfaceIIngredientCondition
-
getCommandString
- Specified by:
getCommandStringin interfaceIIngredientCondition
-
getSerializer
- Specified by:
getSerializerin interfaceIIngredientCondition
-
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 '=='. -
minDamage
public int minDamage()Returns the value of theminDamagerecord component.- Returns:
- the value of the
minDamagerecord component
-