Record Class MangroveRootPlacement
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.rootplacers.MangroveRootPlacement
-
Field Summary
Modifier and TypeFieldDescriptionThe field for thecanGrowThrough
record component.static final com.mojang.serialization.Codec
<MangroveRootPlacement> private final int
The field for themaxRootLength
record component.private final int
The field for themaxRootWidth
record component.The field for themuddyRootsIn
record component.private final BlockStateProvider
The field for themuddyRootsProvider
record component.private final float
The field for therandomSkewChance
record component. -
Constructor Summary
ConstructorDescriptionMangroveRootPlacement
(HolderSet<Block> canGrowThrough, HolderSet<Block> muddyRootsIn, BlockStateProvider muddyRootsProvider, int maxRootWidth, int maxRootLength, float randomSkewChance) Creates an instance of aMangroveRootPlacement
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanGrowThrough
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxRootLength
record component.int
Returns the value of themaxRootWidth
record component.Returns the value of themuddyRootsIn
record component.Returns the value of themuddyRootsProvider
record component.float
Returns the value of therandomSkewChance
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
canGrowThrough
The field for thecanGrowThrough
record component. -
muddyRootsIn
The field for themuddyRootsIn
record component. -
muddyRootsProvider
The field for themuddyRootsProvider
record component. -
maxRootWidth
private final int maxRootWidthThe field for themaxRootWidth
record component. -
maxRootLength
private final int maxRootLengthThe field for themaxRootLength
record component. -
randomSkewChance
private final float randomSkewChanceThe field for therandomSkewChance
record component. -
CODEC
-
-
Constructor Details
-
MangroveRootPlacement
public MangroveRootPlacement(HolderSet<Block> canGrowThrough, HolderSet<Block> muddyRootsIn, BlockStateProvider muddyRootsProvider, int maxRootWidth, int maxRootLength, float randomSkewChance) Creates an instance of aMangroveRootPlacement
record class.- Parameters:
canGrowThrough
- the value for thecanGrowThrough
record componentmuddyRootsIn
- the value for themuddyRootsIn
record componentmuddyRootsProvider
- the value for themuddyRootsProvider
record componentmaxRootWidth
- the value for themaxRootWidth
record componentmaxRootLength
- the value for themaxRootLength
record componentrandomSkewChance
- the value for therandomSkewChance
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
canGrowThrough
Returns the value of thecanGrowThrough
record component.- Returns:
- the value of the
canGrowThrough
record component
-
muddyRootsIn
Returns the value of themuddyRootsIn
record component.- Returns:
- the value of the
muddyRootsIn
record component
-
muddyRootsProvider
Returns the value of themuddyRootsProvider
record component.- Returns:
- the value of the
muddyRootsProvider
record component
-
maxRootWidth
public int maxRootWidth()Returns the value of themaxRootWidth
record component.- Returns:
- the value of the
maxRootWidth
record component
-
maxRootLength
public int maxRootLength()Returns the value of themaxRootLength
record component.- Returns:
- the value of the
maxRootLength
record component
-
randomSkewChance
public float randomSkewChance()Returns the value of therandomSkewChance
record component.- Returns:
- the value of the
randomSkewChance
record component
-