Record Class GeyserEntityType

java.lang.Object
java.lang.Record
org.geysermc.geyser.entity.GeyserEntityType
All Implemented Interfaces:
org.geysermc.geyser.api.entity.definition.JavaEntityType

public record GeyserEntityType(org.geysermc.geyser.api.util.Identifier identifier, org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType mcpl) extends Record implements org.geysermc.geyser.api.entity.definition.JavaEntityType
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeyserEntityType(org.geysermc.geyser.api.util.Identifier identifier, org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType mcpl)
    Creates an instance of a GeyserEntityType record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.geysermc.geyser.api.entity.definition.GeyserEntityDefinition
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    float
     
    org.geysermc.geyser.api.util.Identifier
    Returns the value of the identifier record component.
    boolean
    is(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type)
     
    boolean
     
    org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType
    Returns the value of the mcpl record component.
    of(int javaId)
     
    static @Nullable GeyserEntityType
    of(net.kyori.adventure.key.Key javaKey)
     
    of(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type)
     
    ofVanilla(org.geysermc.geyser.api.util.Identifier javaIdentifier)
     
    ofVanilla(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType builtin)
     
    final String
    Returns a string representation of this record class.
    boolean
     
    float
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.geysermc.geyser.api.entity.definition.JavaEntityType

    is
  • Constructor Details

    • GeyserEntityType

      public GeyserEntityType(org.geysermc.geyser.api.util.Identifier identifier, org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType mcpl)
      Creates an instance of a GeyserEntityType record class.
      Parameters:
      identifier - the value for the identifier record component
      mcpl - the value for the mcpl record component
  • Method Details

    • isUnregistered

      public boolean isUnregistered()
    • vanilla

      public boolean vanilla()
      Specified by:
      vanilla in interface org.geysermc.geyser.api.entity.definition.JavaEntityType
    • width

      public float width()
      Specified by:
      width in interface org.geysermc.geyser.api.entity.definition.JavaEntityType
    • height

      public float height()
      Specified by:
      height in interface org.geysermc.geyser.api.entity.definition.JavaEntityType
    • defaultBedrockDefinition

      public @Nullable org.geysermc.geyser.api.entity.definition.GeyserEntityDefinition defaultBedrockDefinition()
      Specified by:
      defaultBedrockDefinition in interface org.geysermc.geyser.api.entity.definition.JavaEntityType
    • is

      public boolean is(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type)
    • ofVanilla

      public static GeyserEntityType ofVanilla(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType builtin)
    • ofVanilla

      public static GeyserEntityType ofVanilla(org.geysermc.geyser.api.util.Identifier javaIdentifier)
      Throws:
      IllegalArgumentException - document this in API
    • of

      public static GeyserEntityType of(int javaId)
    • of

      public static @Nullable GeyserEntityType of(net.kyori.adventure.key.Key javaKey)
    • of

      public static GeyserEntityType of(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type)
    • 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.
    • identifier

      public org.geysermc.geyser.api.util.Identifier identifier()
      Returns the value of the identifier record component.
      Specified by:
      identifier in interface org.geysermc.geyser.api.entity.definition.JavaEntityType
      Returns:
      the value of the identifier record component
    • mcpl

      public org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType mcpl()
      Returns the value of the mcpl record component.
      Returns:
      the value of the mcpl record component