Record Class SurfaceRules.NotConditionSource
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.SurfaceRules.NotConditionSource
- All Implemented Interfaces:
Function<SurfaceRules.Context,
,SurfaceRules.Condition> SurfaceRules.ConditionSource
- Enclosing class:
SurfaceRules
static record SurfaceRules.NotConditionSource(SurfaceRules.ConditionSource target)
extends Record
implements SurfaceRules.ConditionSource
-
Field Summary
Modifier and TypeFieldDescription(package private) static final KeyDispatchDataCodec<SurfaceRules.NotConditionSource>
private final SurfaceRules.ConditionSource
The field for thetarget
record component. -
Constructor Summary
ConstructorDescriptionCreates an instance of aNotConditionSource
record class. -
Method Summary
Modifier and TypeMethodDescriptionapply
(SurfaceRules.Context p_189674_) KeyDispatchDataCodec<? extends SurfaceRules.ConditionSource>
codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.target()
Returns the value of thetarget
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
target
The field for thetarget
record component. -
CODEC
-
-
Constructor Details
-
NotConditionSource
NotConditionSource(SurfaceRules.ConditionSource target) Creates an instance of aNotConditionSource
record class.- Parameters:
target
- the value for thetarget
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceSurfaceRules.ConditionSource
-
apply
- Specified by:
apply
in interfaceFunction<SurfaceRules.Context,
SurfaceRules.Condition>
-
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)
. -
target
Returns the value of thetarget
record component.- Returns:
- the value of the
target
record component
-