Package net.minecraft.world.level.border
Record Class WorldBorder.Settings
java.lang.Object
java.lang.Record
net.minecraft.world.level.border.WorldBorder.Settings
- Enclosing class:
WorldBorder
public static record WorldBorder.Settings(double centerX, double centerZ, double damagePerBlock, double safeZone, int warningBlocks, int warningTime, double size, long lerpTime, double lerpTarget)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for thecenterXrecord component.private final doubleThe field for thecenterZrecord component.static final com.mojang.serialization.Codec<WorldBorder.Settings> private final doubleThe field for thedamagePerBlockrecord component.static final WorldBorder.Settingsprivate final doubleThe field for thelerpTargetrecord component.private final longThe field for thelerpTimerecord component.private final doubleThe field for thesafeZonerecord component.private final doubleThe field for thesizerecord component.private final intThe field for thewarningBlocksrecord component.private final intThe field for thewarningTimerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSettings(double centerX, double centerZ, double damagePerBlock, double safeZone, int warningBlocks, int warningTime, double size, long lerpTime, double lerpTarget) Creates an instance of aSettingsrecord class.Settings(WorldBorder p_62032_) -
Method Summary
Modifier and TypeMethodDescriptiondoublecenterX()Returns the value of thecenterXrecord component.doublecenterZ()Returns the value of thecenterZrecord component.doubleReturns the value of thedamagePerBlockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelerpTargetrecord component.longlerpTime()Returns the value of thelerpTimerecord component.doublesafeZone()Returns the value of thesafeZonerecord component.doublesize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thewarningBlocksrecord component.intReturns the value of thewarningTimerecord component.
-
Field Details
-
centerX
private final double centerXThe field for thecenterXrecord component. -
centerZ
private final double centerZThe field for thecenterZrecord component. -
damagePerBlock
private final double damagePerBlockThe field for thedamagePerBlockrecord component. -
safeZone
private final double safeZoneThe field for thesafeZonerecord component. -
warningBlocks
private final int warningBlocksThe field for thewarningBlocksrecord component. -
warningTime
private final int warningTimeThe field for thewarningTimerecord component. -
size
private final double sizeThe field for thesizerecord component. -
lerpTime
private final long lerpTimeThe field for thelerpTimerecord component. -
lerpTarget
private final double lerpTargetThe field for thelerpTargetrecord component. -
DEFAULT
-
CODEC
-
-
Constructor Details
-
Settings
-
Settings
public Settings(double centerX, double centerZ, double damagePerBlock, double safeZone, int warningBlocks, int warningTime, double size, long lerpTime, double lerpTarget) Creates an instance of aSettingsrecord class.- Parameters:
centerX- the value for thecenterXrecord componentcenterZ- the value for thecenterZrecord componentdamagePerBlock- the value for thedamagePerBlockrecord componentsafeZone- the value for thesafeZonerecord componentwarningBlocks- the value for thewarningBlocksrecord componentwarningTime- the value for thewarningTimerecord componentsize- the value for thesizerecord componentlerpTime- the value for thelerpTimerecord componentlerpTarget- the value for thelerpTargetrecord component
-
-
Method Details
-
toWorldBorder
-
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 '=='. -
centerX
public double centerX()Returns the value of thecenterXrecord component.- Returns:
- the value of the
centerXrecord component
-
centerZ
public double centerZ()Returns the value of thecenterZrecord component.- Returns:
- the value of the
centerZrecord component
-
damagePerBlock
public double damagePerBlock()Returns the value of thedamagePerBlockrecord component.- Returns:
- the value of the
damagePerBlockrecord component
-
safeZone
public double safeZone()Returns the value of thesafeZonerecord component.- Returns:
- the value of the
safeZonerecord component
-
warningBlocks
public int warningBlocks()Returns the value of thewarningBlocksrecord component.- Returns:
- the value of the
warningBlocksrecord component
-
warningTime
public int warningTime()Returns the value of thewarningTimerecord component.- Returns:
- the value of the
warningTimerecord component
-
size
public double size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
lerpTime
public long lerpTime()Returns the value of thelerpTimerecord component.- Returns:
- the value of the
lerpTimerecord component
-
lerpTarget
public double lerpTarget()Returns the value of thelerpTargetrecord component.- Returns:
- the value of the
lerpTargetrecord component
-