Record Class DimensionPadding
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pools.DimensionPadding
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thebottom
record component.static final com.mojang.serialization.Codec
<DimensionPadding> private static final com.mojang.serialization.Codec
<DimensionPadding> private final int
The field for thetop
record component.static final DimensionPadding
-
Constructor Summary
ConstructorDescriptionDimensionPadding
(int p_348567_) DimensionPadding
(int bottom, int top) Creates an instance of aDimensionPadding
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
bottom()
Returns the value of thebottom
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
final int
hashCode()
Returns a hash code value for this object.int
top()
Returns the value of thetop
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
bottom
private final int bottomThe field for thebottom
record component. -
top
private final int topThe field for thetop
record component. -
RECORD_CODEC
-
CODEC
-
ZERO
-
-
Constructor Details
-
DimensionPadding
public DimensionPadding(int p_348567_) -
DimensionPadding
public DimensionPadding(int bottom, int top) Creates an instance of aDimensionPadding
record class.- Parameters:
bottom
- the value for thebottom
record componenttop
- the value for thetop
record component
-
-
Method Details
-
hasEqualTopAndBottom
public boolean hasEqualTopAndBottom() -
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. All components in this record class are compared with '=='. -
bottom
public int bottom()Returns the value of thebottom
record component.- Returns:
- the value of the
bottom
record component
-
top
public int top()Returns the value of thetop
record component.- Returns:
- the value of the
top
record component
-