Record Class Abilities.Packed

java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.Abilities.Packed
Enclosing class:
Abilities

public static record Abilities.Packed(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<Abilities.Packed>
     
    private final boolean
    The field for the flying record component.
    private final float
    The field for the flyingSpeed record component.
    private final boolean
    The field for the instabuild record component.
    private final boolean
    The field for the invulnerable record component.
    private final boolean
    The field for the mayBuild record component.
    private final boolean
    The field for the mayFly record component.
    private final float
    The field for the walkingSpeed record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Packed(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed)
    Creates an instance of a Packed record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the flying record component.
    float
    Returns the value of the flyingSpeed record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the instabuild record component.
    boolean
    Returns the value of the invulnerable record component.
    boolean
    Returns the value of the mayBuild record component.
    boolean
    Returns the value of the mayFly record component.
    final String
    Returns a string representation of this record class.
    float
    Returns the value of the walkingSpeed record component.

    Methods inherited from class java.lang.Object

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

    • invulnerable

      private final boolean invulnerable
      The field for the invulnerable record component.
    • flying

      private final boolean flying
      The field for the flying record component.
    • mayFly

      private final boolean mayFly
      The field for the mayFly record component.
    • instabuild

      private final boolean instabuild
      The field for the instabuild record component.
    • mayBuild

      private final boolean mayBuild
      The field for the mayBuild record component.
    • flyingSpeed

      private final float flyingSpeed
      The field for the flyingSpeed record component.
    • walkingSpeed

      private final float walkingSpeed
      The field for the walkingSpeed record component.
    • CODEC

      public static final com.mojang.serialization.Codec<Abilities.Packed> CODEC
  • Constructor Details

    • Packed

      public Packed(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed)
      Creates an instance of a Packed record class.
      Parameters:
      invulnerable - the value for the invulnerable record component
      flying - the value for the flying record component
      mayFly - the value for the mayFly record component
      instabuild - the value for the instabuild record component
      mayBuild - the value for the mayBuild record component
      flyingSpeed - the value for the flyingSpeed record component
      walkingSpeed - the value for the walkingSpeed record component
  • Method Details

    • 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.
    • invulnerable

      public boolean invulnerable()
      Returns the value of the invulnerable record component.
      Returns:
      the value of the invulnerable record component
    • flying

      public boolean flying()
      Returns the value of the flying record component.
      Returns:
      the value of the flying record component
    • mayFly

      public boolean mayFly()
      Returns the value of the mayFly record component.
      Returns:
      the value of the mayFly record component
    • instabuild

      public boolean instabuild()
      Returns the value of the instabuild record component.
      Returns:
      the value of the instabuild record component
    • mayBuild

      public boolean mayBuild()
      Returns the value of the mayBuild record component.
      Returns:
      the value of the mayBuild record component
    • flyingSpeed

      public float flyingSpeed()
      Returns the value of the flyingSpeed record component.
      Returns:
      the value of the flyingSpeed record component
    • walkingSpeed

      public float walkingSpeed()
      Returns the value of the walkingSpeed record component.
      Returns:
      the value of the walkingSpeed record component