Record Class GeodeFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.GeodeFeature
- All Implemented Interfaces:
Feature
public record GeodeFeature(GeodeBlockSettings blockSettings, GeodeLayerSettings layerSettings, GeodeCrackSettings crackSettings, double usePotentialPlacementsChance, double useAlternateLayer0Chance, boolean placementsRequireLayer0Alternate, IntProvider outerWallDistance, IntProvider distributionPoints, IntProvider pointOffset, int minGenOffset, int maxGenOffset, double noiseMultiplier, int invalidBlocksThreshold)
extends Record
implements Feature
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GeodeBlockSettingsThe field for theblockSettingsrecord component.static final com.mojang.serialization.Codec<Double> static final com.mojang.serialization.MapCodec<GeodeFeature> private final GeodeCrackSettingsThe field for thecrackSettingsrecord component.private static final Direction[]private final IntProviderThe field for thedistributionPointsrecord component.private final intThe field for theinvalidBlocksThresholdrecord component.private final GeodeLayerSettingsThe field for thelayerSettingsrecord component.private final intThe field for themaxGenOffsetrecord component.private final intThe field for theminGenOffsetrecord component.private static final NormalNoiseprivate final doubleThe field for thenoiseMultiplierrecord component.private final IntProviderThe field for theouterWallDistancerecord component.private final booleanThe field for theplacementsRequireLayer0Alternaterecord component.private final IntProviderThe field for thepointOffsetrecord component.private final doubleThe field for theuseAlternateLayer0Chancerecord component.private final doubleThe field for theusePotentialPlacementsChancerecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionGeodeFeature(GeodeBlockSettings blockSettings, GeodeLayerSettings layerSettings, GeodeCrackSettings crackSettings, double usePotentialPlacementsChance, double useAlternateLayer0Chance, boolean placementsRequireLayer0Alternate, IntProvider outerWallDistance, IntProvider distributionPoints, IntProvider pointOffset, int minGenOffset, int maxGenOffset, double noiseMultiplier, int invalidBlocksThreshold) Creates an instance of aGeodeFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockSettingsrecord component.com.mojang.serialization.MapCodec<GeodeFeature> codec()Returns the value of thecrackSettingsrecord component.Returns the value of thedistributionPointsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinvalidBlocksThresholdrecord component.Returns the value of thelayerSettingsrecord component.intReturns the value of themaxGenOffsetrecord component.intReturns the value of theminGenOffsetrecord component.doubleReturns the value of thenoiseMultiplierrecord component.Returns the value of theouterWallDistancerecord component.booleanplace(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) booleanReturns the value of theplacementsRequireLayer0Alternaterecord component.Returns the value of thepointOffsetrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of theuseAlternateLayer0Chancerecord component.doubleReturns the value of theusePotentialPlacementsChancerecord component.Methods inherited from interface Feature
getSubFeatures, markAboveForPostProcessing, safeSetBlock, setBlock
-
Field Details
-
blockSettings
The field for theblockSettingsrecord component. -
layerSettings
The field for thelayerSettingsrecord component. -
crackSettings
The field for thecrackSettingsrecord component. -
usePotentialPlacementsChance
private final double usePotentialPlacementsChanceThe field for theusePotentialPlacementsChancerecord component. -
useAlternateLayer0Chance
private final double useAlternateLayer0ChanceThe field for theuseAlternateLayer0Chancerecord component. -
placementsRequireLayer0Alternate
private final boolean placementsRequireLayer0AlternateThe field for theplacementsRequireLayer0Alternaterecord component. -
outerWallDistance
The field for theouterWallDistancerecord component. -
distributionPoints
The field for thedistributionPointsrecord component. -
pointOffset
The field for thepointOffsetrecord component. -
minGenOffset
private final int minGenOffsetThe field for theminGenOffsetrecord component. -
maxGenOffset
private final int maxGenOffsetThe field for themaxGenOffsetrecord component. -
noiseMultiplier
private final double noiseMultiplierThe field for thenoiseMultiplierrecord component. -
invalidBlocksThreshold
private final int invalidBlocksThresholdThe field for theinvalidBlocksThresholdrecord component. -
NOISE_PARAMETERS
-
CHANCE_RANGE
-
CODEC
-
DIRECTIONS
-
-
Constructor Details
-
GeodeFeature
public GeodeFeature(GeodeBlockSettings blockSettings, GeodeLayerSettings layerSettings, GeodeCrackSettings crackSettings, double usePotentialPlacementsChance, double useAlternateLayer0Chance, boolean placementsRequireLayer0Alternate, IntProvider outerWallDistance, IntProvider distributionPoints, IntProvider pointOffset, int minGenOffset, int maxGenOffset, double noiseMultiplier, int invalidBlocksThreshold) Creates an instance of aGeodeFeaturerecord class.- Parameters:
blockSettings- the value for theblockSettingsrecord componentlayerSettings- the value for thelayerSettingsrecord componentcrackSettings- the value for thecrackSettingsrecord componentusePotentialPlacementsChance- the value for theusePotentialPlacementsChancerecord componentuseAlternateLayer0Chance- the value for theuseAlternateLayer0Chancerecord componentplacementsRequireLayer0Alternate- the value for theplacementsRequireLayer0Alternaterecord componentouterWallDistance- the value for theouterWallDistancerecord componentdistributionPoints- the value for thedistributionPointsrecord componentpointOffset- the value for thepointOffsetrecord componentminGenOffset- the value for theminGenOffsetrecord componentmaxGenOffset- the value for themaxGenOffsetrecord componentnoiseMultiplier- the value for thenoiseMultiplierrecord componentinvalidBlocksThreshold- the value for theinvalidBlocksThresholdrecord component
-
-
Method Details
-
codec
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
blockSettings
Returns the value of theblockSettingsrecord component.- Returns:
- the value of the
blockSettingsrecord component
-
layerSettings
Returns the value of thelayerSettingsrecord component.- Returns:
- the value of the
layerSettingsrecord component
-
crackSettings
Returns the value of thecrackSettingsrecord component.- Returns:
- the value of the
crackSettingsrecord component
-
usePotentialPlacementsChance
public double usePotentialPlacementsChance()Returns the value of theusePotentialPlacementsChancerecord component.- Returns:
- the value of the
usePotentialPlacementsChancerecord component
-
useAlternateLayer0Chance
public double useAlternateLayer0Chance()Returns the value of theuseAlternateLayer0Chancerecord component.- Returns:
- the value of the
useAlternateLayer0Chancerecord component
-
placementsRequireLayer0Alternate
public boolean placementsRequireLayer0Alternate()Returns the value of theplacementsRequireLayer0Alternaterecord component.- Returns:
- the value of the
placementsRequireLayer0Alternaterecord component
-
outerWallDistance
Returns the value of theouterWallDistancerecord component.- Returns:
- the value of the
outerWallDistancerecord component
-
distributionPoints
Returns the value of thedistributionPointsrecord component.- Returns:
- the value of the
distributionPointsrecord component
-
pointOffset
Returns the value of thepointOffsetrecord component.- Returns:
- the value of the
pointOffsetrecord component
-
minGenOffset
public int minGenOffset()Returns the value of theminGenOffsetrecord component.- Returns:
- the value of the
minGenOffsetrecord component
-
maxGenOffset
public int maxGenOffset()Returns the value of themaxGenOffsetrecord component.- Returns:
- the value of the
maxGenOffsetrecord component
-
noiseMultiplier
public double noiseMultiplier()Returns the value of thenoiseMultiplierrecord component.- Returns:
- the value of the
noiseMultiplierrecord component
-
invalidBlocksThreshold
public int invalidBlocksThreshold()Returns the value of theinvalidBlocksThresholdrecord component.- Returns:
- the value of the
invalidBlocksThresholdrecord component
-