Record Class DiskConfiguration
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.configurations.DiskConfiguration
- All Implemented Interfaces:
FeatureConfiguration
public record DiskConfiguration(BlockState state, IntProvider radius, int halfHeight, List<BlockState> targets)
extends Record
implements FeatureConfiguration
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DiskConfiguration>
private final int
The field for thehalfHeight
record component.private final IntProvider
The field for theradius
record component.private final BlockState
The field for thestate
record component.private final List<BlockState>
The field for thetargets
record component.Fields inherited from interface net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration
NONE
-
Constructor Summary
ConstructorDescriptionDiskConfiguration
(BlockState state, IntProvider radius, int halfHeight, List<BlockState> targets) Creates an instance of aDiskConfiguration
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thehalfHeight
record component.final int
hashCode()
Returns a hash code value for this object.radius()
Returns the value of theradius
record component.state()
Returns the value of thestate
record component.targets()
Returns the value of thetargets
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration
getFeatures
-
Field Details
-
state
The field for thestate
record component. -
radius
The field for theradius
record component. -
halfHeight
private final int halfHeightThe field for thehalfHeight
record component. -
targets
The field for thetargets
record component. -
CODEC
-
-
Constructor Details
-
DiskConfiguration
public DiskConfiguration(BlockState state, IntProvider radius, int halfHeight, List<BlockState> targets) Creates an instance of aDiskConfiguration
record class.- Parameters:
state
- the value for thestate
record componentradius
- the value for theradius
record componenthalfHeight
- the value for thehalfHeight
record componenttargets
- the value for thetargets
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 '=='. -
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
radius
Returns the value of theradius
record component.- Returns:
- the value of the
radius
record component
-
halfHeight
public int halfHeight()Returns the value of thehalfHeight
record component.- Returns:
- the value of the
halfHeight
record component
-
targets
Returns the value of thetargets
record component.- Returns:
- the value of the
targets
record component
-