Record Class SharedFeatureEnabledCondition
java.lang.Object
java.lang.Record
com.petrolpark.core.data.condition.SharedFeatureEnabledCondition
- All Implemented Interfaces:
net.neoforged.neoforge.common.conditions.ICondition
public record SharedFeatureEnabledCondition(SharedFeatureFlag featureFlag)
extends Record
implements net.neoforged.neoforge.common.conditions.ICondition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforge.common.conditions.ICondition
net.neoforged.neoforge.common.conditions.ICondition.IContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SharedFeatureEnabledCondition> Fields inherited from interface net.neoforged.neoforge.common.conditions.ICondition
LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSharedFeatureEnabledCondition(SharedFeatureFlag featureFlag) Creates an instance of aSharedFeatureEnabledConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.conditions.ICondition> codec()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefeatureFlagrecord component.final inthashCode()Returns a hash code value for this object.booleantest(net.neoforged.neoforge.common.conditions.ICondition.IContext context) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Method Details
-
test
public boolean test(@Nonnull net.neoforged.neoforge.common.conditions.ICondition.IContext context) - Specified by:
testin interfacenet.neoforged.neoforge.common.conditions.ICondition
-
codec
public com.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.conditions.ICondition> codec()- Specified by:
codecin interfacenet.neoforged.neoforge.common.conditions.ICondition
-
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). -
featureFlag
Returns the value of thefeatureFlagrecord component.- Returns:
- the value of the
featureFlagrecord component
-