Record Class FrozenDimensionBoundRuleSource
java.lang.Object
java.lang.Record
net.frozenblock.lib.worldgen.surface.api.FrozenDimensionBoundRuleSource
public record FrozenDimensionBoundRuleSource(net.minecraft.resources.ResourceLocation dimension, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource ruleSource)
extends Record
Holds both a
ResourceLocation and SurfaceRules.RuleSource.
The ResourceLocation denotes the dimension to be modified, and the RuleSource are the rules to be applied to it.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FrozenDimensionBoundRuleSource> -
Constructor Summary
ConstructorsConstructorDescriptionFrozenDimensionBoundRuleSource(net.minecraft.resources.ResourceLocation dimension, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource ruleSource) Creates an instance of aFrozenDimensionBoundRuleSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.levelgen.SurfaceRules.RuleSourceReturns the value of theruleSourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
FrozenDimensionBoundRuleSource
public FrozenDimensionBoundRuleSource(net.minecraft.resources.ResourceLocation dimension, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource ruleSource) Creates an instance of aFrozenDimensionBoundRuleSourcerecord class.- Parameters:
dimension- the value for thedimensionrecord componentruleSource- the value for theruleSourcerecord component
-
-
Method Details
-
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). -
dimension
public net.minecraft.resources.ResourceLocation dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
ruleSource
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource ruleSource()Returns the value of theruleSourcerecord component.- Returns:
- the value of the
ruleSourcerecord component
-