Record Class ExtendedSurfaceRules.RandomConditionSource
java.lang.Object
java.lang.Record
fr.rodofire.ewc.world.gen.surfacebuilder.ExtendedSurfaceRules.RandomConditionSource
- All Implemented Interfaces:
Function<net.minecraft.world.level.levelgen.SurfaceRules.Context,,net.minecraft.world.level.levelgen.SurfaceRules.Condition> net.minecraft.world.level.levelgen.SurfaceRules.ConditionSource
- Enclosing class:
ExtendedSurfaceRules
public static record ExtendedSurfaceRules.RandomConditionSource(net.minecraft.resources.ResourceLocation name, float bound)
extends Record
implements net.minecraft.world.level.levelgen.SurfaceRules.ConditionSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.util.KeyDispatchDataCodec<ExtendedSurfaceRules.RandomConditionSource> -
Constructor Summary
ConstructorsConstructorDescriptionRandomConditionSource(net.minecraft.resources.ResourceLocation name, float bound) Creates an instance of aRandomConditionSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.levelgen.SurfaceRules.Conditionapply(net.minecraft.world.level.levelgen.SurfaceRules.Context materialRuleContext) floatbound()Returns the value of theboundrecord component.@NotNull net.minecraft.util.KeyDispatchDataCodec<? extends net.minecraft.world.level.levelgen.SurfaceRules.ConditionSource> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationname()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
public static final net.minecraft.util.KeyDispatchDataCodec<ExtendedSurfaceRules.RandomConditionSource> CODEC
-
-
Constructor Details
-
RandomConditionSource
public RandomConditionSource(net.minecraft.resources.ResourceLocation name, float bound) Creates an instance of aRandomConditionSourcerecord class.- Parameters:
name- the value for thenamerecord componentbound- the value for theboundrecord component
-
-
Method Details
-
codec
@NotNull public @NotNull net.minecraft.util.KeyDispatchDataCodec<? extends net.minecraft.world.level.levelgen.SurfaceRules.ConditionSource> codec()- Specified by:
codecin interfacenet.minecraft.world.level.levelgen.SurfaceRules.ConditionSource
-
apply
public net.minecraft.world.level.levelgen.SurfaceRules.Condition apply(net.minecraft.world.level.levelgen.SurfaceRules.Context materialRuleContext) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
public net.minecraft.resources.ResourceLocation name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
bound
public float bound()Returns the value of theboundrecord component.- Returns:
- the value of the
boundrecord component
-