Package net.minecraft.world.gen
Record Class StructureWeightSampler.Piece
java.lang.Object
java.lang.Record
net.minecraft.world.gen.StructureWeightSampler.Piece
- Record Components:
box-terrainAdjustment-groundLevelDelta-
- Enclosing class:
StructureWeightSampler
public static record StructureWeightSampler.Piece(BlockBox box, StructureTerrainAdaptation terrainAdjustment, int groundLevelDelta)
extends Record
- Mappings:
Namespace Name official dgu$aintermediary net/minecraft/class_5817$class_7301named net/minecraft/world/gen/StructureWeightSampler$Pieceofficial aintermediary comp_682named boxofficial bintermediary comp_683named terrainAdjustmentofficial cintermediary comp_684named groundLevelDelta
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockBoxThe field for theboxrecord component.private final intThe field for thegroundLevelDeltarecord component.private final StructureTerrainAdaptationThe field for theterrainAdjustmentrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPiece(BlockBox blockBox, StructureTerrainAdaptation structureTerrainAdaptation, int int2) -
Method Summary
Modifier and TypeMethodDescriptionbox()Returns the value of theboxrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegroundLevelDeltarecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theterrainAdjustmentrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
box
The field for theboxrecord component. -
terrainAdjustment
The field for theterrainAdjustmentrecord component. -
groundLevelDelta
private final int groundLevelDeltaThe field for thegroundLevelDeltarecord component.
-
-
Constructor Details
-
Piece
-
-
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 '=='. -
box
Returns the value of theboxrecord component.- Returns:
- the value of the
boxrecord component
-
terrainAdjustment
Returns the value of theterrainAdjustmentrecord component.- Returns:
- the value of the
terrainAdjustmentrecord component
-
groundLevelDelta
public int groundLevelDelta()Returns the value of thegroundLevelDeltarecord component.- Returns:
- the value of the
groundLevelDeltarecord component
-