Package org.geysermc.geyser.entity
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
ConstructorsConstructorDescriptionGeyserEntityType(org.geysermc.geyser.api.util.Identifier identifier, org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType mcpl) Creates an instance of aGeyserEntityTyperecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable org.geysermc.geyser.api.entity.definition.GeyserEntityDefinitionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatheight()org.geysermc.geyser.api.util.IdentifierReturns the value of theidentifierrecord component.booleanis(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type) booleanorg.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityTypemcpl()Returns the value of themcplrecord component.static GeyserEntityTypeof(int javaId) static @Nullable GeyserEntityTypeof(net.kyori.adventure.key.Key javaKey) static GeyserEntityTypeof(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type) static GeyserEntityTypeofVanilla(org.geysermc.geyser.api.util.Identifier javaIdentifier) static GeyserEntityTypeofVanilla(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType builtin) final StringtoString()Returns a string representation of this record class.booleanvanilla()floatwidth()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aGeyserEntityTyperecord class.- Parameters:
identifier- the value for theidentifierrecord componentmcpl- the value for themcplrecord component
-
-
Method Details
-
isUnregistered
public boolean isUnregistered() -
vanilla
public boolean vanilla()- Specified by:
vanillain interfaceorg.geysermc.geyser.api.entity.definition.JavaEntityType
-
width
public float width()- Specified by:
widthin interfaceorg.geysermc.geyser.api.entity.definition.JavaEntityType
-
height
public float height()- Specified by:
heightin interfaceorg.geysermc.geyser.api.entity.definition.JavaEntityType
-
defaultBedrockDefinition
public @Nullable org.geysermc.geyser.api.entity.definition.GeyserEntityDefinition defaultBedrockDefinition()- Specified by:
defaultBedrockDefinitionin interfaceorg.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
- Throws:
IllegalArgumentException- document this in API
-
of
-
of
-
of
public static GeyserEntityType of(org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType type) -
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 withObjects::equals(Object,Object). -
identifier
public org.geysermc.geyser.api.util.Identifier identifier()Returns the value of theidentifierrecord component.- Specified by:
identifierin interfaceorg.geysermc.geyser.api.entity.definition.JavaEntityType- Returns:
- the value of the
identifierrecord component
-
mcpl
public org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType mcpl()Returns the value of themcplrecord component.- Returns:
- the value of the
mcplrecord component
-