Record Class DimensionPadding
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pools.DimensionPadding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebottomrecord component.static final com.mojang.serialization.Codec<DimensionPadding> private static final com.mojang.serialization.Codec<DimensionPadding> private final intThe field for thetoprecord component.static final DimensionPadding -
Constructor Summary
ConstructorsConstructorDescriptionDimensionPadding(int p_348567_) DimensionPadding(int bottom, int top) Creates an instance of aDimensionPaddingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbottom()Returns the value of thebottomrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.inttop()Returns the value of thetoprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
bottom
private final int bottomThe field for thebottomrecord component. -
top
private final int topThe field for thetoprecord component. -
RECORD_CODEC
-
CODEC
-
ZERO
-
-
Constructor Details
-
DimensionPadding
public DimensionPadding(int p_348567_) -
DimensionPadding
public DimensionPadding(int bottom, int top) Creates an instance of aDimensionPaddingrecord class.- Parameters:
bottom- the value for thebottomrecord componenttop- the value for thetoprecord 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 thebottomrecord component.- Returns:
- the value of the
bottomrecord component
-
top
public int top()Returns the value of thetoprecord component.- Returns:
- the value of the
toprecord component
-