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

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The field for the centerX record component.
    private final double
    The field for the centerZ record component.
    static final com.mojang.serialization.Codec<WorldBorder.Settings>
     
    private final double
    The field for the damagePerBlock record component.
     
    private final double
    The field for the lerpTarget record component.
    private final long
    The field for the lerpTime record component.
    private final double
    The field for the safeZone record component.
    private final double
    The field for the size record component.
    private final int
    The field for the warningBlocks record component.
    private final int
    The field for the warningTime record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Settings(double centerX, double centerZ, double damagePerBlock, double safeZone, int warningBlocks, int warningTime, double size, long lerpTime, double lerpTarget)
    Creates an instance of a Settings record class.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the centerX record component.
    double
    Returns the value of the centerZ record component.
    double
    Returns the value of the damagePerBlock record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the lerpTarget record component.
    long
    Returns the value of the lerpTime record component.
    double
    Returns the value of the safeZone record component.
    double
    Returns the value of the size record component.
    final String
    Returns a string representation of this record class.
     
    int
    Returns the value of the warningBlocks record component.
    int
    Returns the value of the warningTime record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • centerX

      private final double centerX
      The field for the centerX record component.
    • centerZ

      private final double centerZ
      The field for the centerZ record component.
    • damagePerBlock

      private final double damagePerBlock
      The field for the damagePerBlock record component.
    • safeZone

      private final double safeZone
      The field for the safeZone record component.
    • warningBlocks

      private final int warningBlocks
      The field for the warningBlocks record component.
    • warningTime

      private final int warningTime
      The field for the warningTime record component.
    • size

      private final double size
      The field for the size record component.
    • lerpTime

      private final long lerpTime
      The field for the lerpTime record component.
    • lerpTarget

      private final double lerpTarget
      The field for the lerpTarget record component.
    • DEFAULT

      public static final WorldBorder.Settings DEFAULT
    • CODEC

      public static final com.mojang.serialization.Codec<WorldBorder.Settings> CODEC
  • Constructor Details

    • Settings

      public Settings(WorldBorder p_62032_)
    • 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 a Settings record class.
      Parameters:
      centerX - the value for the centerX record component
      centerZ - the value for the centerZ record component
      damagePerBlock - the value for the damagePerBlock record component
      safeZone - the value for the safeZone record component
      warningBlocks - the value for the warningBlocks record component
      warningTime - the value for the warningTime record component
      size - the value for the size record component
      lerpTime - the value for the lerpTime record component
      lerpTarget - the value for the lerpTarget record component
  • Method Details

    • toWorldBorder

      public WorldBorder toWorldBorder()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • centerX

      public double centerX()
      Returns the value of the centerX record component.
      Returns:
      the value of the centerX record component
    • centerZ

      public double centerZ()
      Returns the value of the centerZ record component.
      Returns:
      the value of the centerZ record component
    • damagePerBlock

      public double damagePerBlock()
      Returns the value of the damagePerBlock record component.
      Returns:
      the value of the damagePerBlock record component
    • safeZone

      public double safeZone()
      Returns the value of the safeZone record component.
      Returns:
      the value of the safeZone record component
    • warningBlocks

      public int warningBlocks()
      Returns the value of the warningBlocks record component.
      Returns:
      the value of the warningBlocks record component
    • warningTime

      public int warningTime()
      Returns the value of the warningTime record component.
      Returns:
      the value of the warningTime record component
    • size

      public double size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • lerpTime

      public long lerpTime()
      Returns the value of the lerpTime record component.
      Returns:
      the value of the lerpTime record component
    • lerpTarget

      public double lerpTarget()
      Returns the value of the lerpTarget record component.
      Returns:
      the value of the lerpTarget record component