Record Class OreVeinRule
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.material.rule.OreVeinRule
- All Implemented Interfaces:
MaterialRule
public record OreVeinRule(BlockState oreBlock, BlockState rawOreBlock, BlockState fillerBlock, float rawOreChance, DensityFunction density, DensityFunction richness, DensityFunction fillerGap)
extends Record
implements MaterialRule
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface MaterialRule
MaterialRule.HolderHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatstatic final com.mojang.serialization.MapCodec<OreVeinRule> private final DensityFunctionThe field for thedensityrecord component.static final intprivate final BlockStateThe field for thefillerBlockrecord component.private final DensityFunctionThe field for thefillerGaprecord component.static final floatstatic final floatstatic final floatstatic final floatprivate final BlockStateThe field for theoreBlockrecord component.private final BlockStateThe field for therawOreBlockrecord component.private final floatThe field for therawOreChancerecord component.private final DensityFunctionThe field for therichnessrecord component.static final floatstatic final floatstatic final floatFields inherited from interface MaterialRule
DIRECT_CODEC, HOLDER_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionOreVeinRule(BlockState oreBlock, BlockState rawOreBlock, BlockState fillerBlock, float rawOreChance, DensityFunction density, DensityFunction richness, DensityFunction fillerGap) Creates an instance of aOreVeinRulerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<OreVeinRule> codec()compile(MaterialRuleContext context) density()Returns the value of thedensityrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefillerBlockrecord component.Returns the value of thefillerGaprecord component.final inthashCode()Returns a hash code value for this object.oreBlock()Returns the value of theoreBlockrecord component.Returns the value of therawOreBlockrecord component.floatReturns the value of therawOreChancerecord component.richness()Returns the value of therichnessrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
oreBlock
The field for theoreBlockrecord component. -
rawOreBlock
The field for therawOreBlockrecord component. -
fillerBlock
The field for thefillerBlockrecord component. -
rawOreChance
private final float rawOreChanceThe field for therawOreChancerecord component. -
density
The field for thedensityrecord component. -
richness
The field for therichnessrecord component. -
fillerGap
The field for thefillerGaprecord component. -
VEININESS_THRESHOLD
public static final float VEININESS_THRESHOLD- See Also:
-
EDGE_ROUNDOFF_BEGIN
public static final int EDGE_ROUNDOFF_BEGIN- See Also:
-
MAX_EDGE_ROUNDOFF
public static final float MAX_EDGE_ROUNDOFF- See Also:
-
VEIN_SOLIDNESS
public static final float VEIN_SOLIDNESS- See Also:
-
MIN_RICHNESS
public static final float MIN_RICHNESS- See Also:
-
MAX_RICHNESS
public static final float MAX_RICHNESS- See Also:
-
MAX_RICHNESS_THRESHOLD
public static final float MAX_RICHNESS_THRESHOLD- See Also:
-
CHANCE_OF_RAW_ORE_BLOCK
private static final float CHANCE_OF_RAW_ORE_BLOCK- See Also:
-
SKIP_ORE_IF_GAP_NOISE_IS_BELOW
public static final float SKIP_ORE_IF_GAP_NOISE_IS_BELOW- See Also:
-
CODEC
-
-
Constructor Details
-
OreVeinRule
public OreVeinRule(BlockState oreBlock, BlockState rawOreBlock, BlockState fillerBlock, float rawOreChance, DensityFunction density, DensityFunction richness, DensityFunction fillerGap) Creates an instance of aOreVeinRulerecord class.- Parameters:
oreBlock- the value for theoreBlockrecord componentrawOreBlock- the value for therawOreBlockrecord componentfillerBlock- the value for thefillerBlockrecord componentrawOreChance- the value for therawOreChancerecord componentdensity- the value for thedensityrecord componentrichness- the value for therichnessrecord componentfillerGap- the value for thefillerGaprecord component
-
-
Method Details
-
compile
- Specified by:
compilein interfaceMaterialRule
-
codec
- Specified by:
codecin interfaceMaterialRule
-
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. -
oreBlock
Returns the value of theoreBlockrecord component.- Returns:
- the value of the
oreBlockrecord component
-
rawOreBlock
Returns the value of therawOreBlockrecord component.- Returns:
- the value of the
rawOreBlockrecord component
-
fillerBlock
Returns the value of thefillerBlockrecord component.- Returns:
- the value of the
fillerBlockrecord component
-
rawOreChance
public float rawOreChance()Returns the value of therawOreChancerecord component.- Returns:
- the value of the
rawOreChancerecord component
-
density
Returns the value of thedensityrecord component.- Returns:
- the value of the
densityrecord component
-
richness
Returns the value of therichnessrecord component.- Returns:
- the value of the
richnessrecord component
-
fillerGap
Returns the value of thefillerGaprecord component.- Returns:
- the value of the
fillerGaprecord component
-