Record Class HitboxImpl

java.lang.Object
java.lang.Record
org.geysermc.geyser.impl.entity.HitboxImpl
All Implemented Interfaces:
org.geysermc.geyser.api.entity.data.types.Hitbox

public record HitboxImpl(org.cloudburstmc.math.vector.Vector3f min, org.cloudburstmc.math.vector.Vector3f max, org.cloudburstmc.math.vector.Vector3f pivot) extends Record implements org.geysermc.geyser.api.entity.data.types.Hitbox
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HitboxImpl(org.cloudburstmc.math.vector.Vector3f min, org.cloudburstmc.math.vector.Vector3f max, org.cloudburstmc.math.vector.Vector3f pivot)
    Creates an instance of a HitboxImpl record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    static List<org.geysermc.geyser.api.entity.data.types.Hitbox>
    fromMetaData(@Nullable org.cloudburstmc.nbt.NbtMap metaDataMap)
     
    final int
    Returns a hash code value for this object.
    org.cloudburstmc.math.vector.Vector3f
    max()
    Returns the value of the max record component.
    org.cloudburstmc.math.vector.Vector3f
    min()
    Returns the value of the min record component.
    org.cloudburstmc.math.vector.Vector3f
    Returns the value of the pivot record component.
    org.cloudburstmc.nbt.NbtMap
     
    static org.cloudburstmc.nbt.NbtMap
    toNbtMap(List<org.geysermc.geyser.api.entity.data.types.Hitbox> hitboxes)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • HitboxImpl

      public HitboxImpl(org.cloudburstmc.math.vector.Vector3f min, org.cloudburstmc.math.vector.Vector3f max, org.cloudburstmc.math.vector.Vector3f pivot)
      Creates an instance of a HitboxImpl record class.
      Parameters:
      min - the value for the min record component
      max - the value for the max record component
      pivot - the value for the pivot record component
  • Method Details

    • fromMetaData

      public static List<org.geysermc.geyser.api.entity.data.types.Hitbox> fromMetaData(@Nullable org.cloudburstmc.nbt.NbtMap metaDataMap)
    • toNbtMap

      public org.cloudburstmc.nbt.NbtMap toNbtMap()
    • toNbtMap

      public static org.cloudburstmc.nbt.NbtMap toNbtMap(List<org.geysermc.geyser.api.entity.data.types.Hitbox> hitboxes)
    • 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 Objects::equals(Object,Object).
      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.
    • min

      public org.cloudburstmc.math.vector.Vector3f min()
      Returns the value of the min record component.
      Specified by:
      min in interface org.geysermc.geyser.api.entity.data.types.Hitbox
      Returns:
      the value of the min record component
    • max

      public org.cloudburstmc.math.vector.Vector3f max()
      Returns the value of the max record component.
      Specified by:
      max in interface org.geysermc.geyser.api.entity.data.types.Hitbox
      Returns:
      the value of the max record component
    • pivot

      public org.cloudburstmc.math.vector.Vector3f pivot()
      Returns the value of the pivot record component.
      Specified by:
      pivot in interface org.geysermc.geyser.api.entity.data.types.Hitbox
      Returns:
      the value of the pivot record component