Record Class NoiseSlider
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.NoiseSlider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<NoiseSlider>private final intThe field for theoffsetrecord component.private final intThe field for thesizerecord component.private final doubleThe field for thetargetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNoiseSlider(double target, int size, int offset) Creates an instance of aNoiseSliderrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleapplySlide(double p_209639_, double p_209640_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intoffset()Returns the value of theoffsetrecord component.intsize()Returns the value of thesizerecord component.doubletarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
target
private final double targetThe field for thetargetrecord component. -
size
private final int sizeThe field for thesizerecord component. -
offset
private final int offsetThe field for theoffsetrecord component. -
CODEC
-
-
Constructor Details
-
NoiseSlider
public NoiseSlider(double target, int size, int offset) Creates an instance of aNoiseSliderrecord class.- Parameters:
target- the value for thetargetrecord componentsize- the value for thesizerecord componentoffset- the value for theoffsetrecord component
-
-
Method Details
-
applySlide
public double applySlide(double p_209639_, double p_209640_) -
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 '=='. -
target
public double target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-