Record Class NoiseSettings
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.NoiseSettings
public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final NoiseSettingsstatic final com.mojang.serialization.Codec<NoiseSettings>protected static final NoiseSettingsprotected static final NoiseSettingsprivate final intThe field for theheightrecord component.private final intThe field for theminYrecord component.protected static final NoiseSettingsprivate final intThe field for thenoiseSizeHorizontalrecord component.private final intThe field for thenoiseSizeVerticalrecord component.protected static final NoiseSettings -
Constructor Summary
ConstructorsConstructorDescriptionNoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical) Creates an instance of aNoiseSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclampToHeightAccessor(LevelHeightAccessor p_224531_) static NoiseSettingscreate(int p_224526_, int p_224527_, int p_224528_, int p_224529_) final booleanIndicates whether some other object is "equal to" this one.intintprivate static com.mojang.serialization.DataResult<NoiseSettings>guardY(NoiseSettings p_158721_) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.intminY()Returns the value of theminYrecord component.intReturns the value of thenoiseSizeHorizontalrecord component.intReturns the value of thenoiseSizeVerticalrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
minY
private final int minYThe field for theminYrecord component. -
height
private final int heightThe field for theheightrecord component. -
noiseSizeHorizontal
private final int noiseSizeHorizontalThe field for thenoiseSizeHorizontalrecord component. -
noiseSizeVertical
private final int noiseSizeVerticalThe field for thenoiseSizeVerticalrecord component. -
CODEC
-
OVERWORLD_NOISE_SETTINGS
-
NETHER_NOISE_SETTINGS
-
END_NOISE_SETTINGS
-
CAVES_NOISE_SETTINGS
-
FLOATING_ISLANDS_NOISE_SETTINGS
-
-
Constructor Details
-
NoiseSettings
public NoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical) Creates an instance of aNoiseSettingsrecord class.- Parameters:
minY- the value for theminYrecord componentheight- the value for theheightrecord componentnoiseSizeHorizontal- the value for thenoiseSizeHorizontalrecord componentnoiseSizeVertical- the value for thenoiseSizeVerticalrecord component
-
-
Method Details
-
guardY
-
create
-
getCellHeight
public int getCellHeight() -
getCellWidth
public int getCellWidth() -
clampToHeightAccessor
-
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 '=='. -
minY
public int minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
noiseSizeHorizontal
public int noiseSizeHorizontal()Returns the value of thenoiseSizeHorizontalrecord component.- Returns:
- the value of the
noiseSizeHorizontalrecord component
-
noiseSizeVertical
public int noiseSizeVertical()Returns the value of thenoiseSizeVerticalrecord component.- Returns:
- the value of the
noiseSizeVerticalrecord component
-