Record Class TagEmptyCondition<T>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.conditions.TagEmptyCondition<T>
- All Implemented Interfaces:
ICondition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforge.common.conditions.ICondition
ICondition.IContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TagEmptyCondition<?>> The field for thetagrecord component.Fields inherited from interface net.neoforged.neoforge.common.conditions.ICondition
LIST_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTagEmptyCondition(ResourceLocation registryType, ResourceLocation tagName) TagEmptyCondition(TagKey<T> tag) Creates an instance of aTagEmptyConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends ICondition> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.tag()Returns the value of thetagrecord component.booleantest(ICondition.IContext context) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tag
The field for thetagrecord component. -
CODEC
-
-
Constructor Details
-
TagEmptyCondition
-
TagEmptyCondition
Creates an instance of aTagEmptyConditionrecord class.- Parameters:
tag- the value for thetagrecord component
-
-
Method Details
-
test
- Specified by:
testin interfaceICondition
-
codec
- Specified by:
codecin interfaceICondition
-
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). -
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-