All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, Leashable, VariantHolder<VariantIntHolder.BuiltIn>, VariantIntHolder

public class CatEntity extends TameableEntity implements VariantIntHolder
  • Constructor Details

  • Method Details

    • initializeMetadata

      protected void initializeMetadata()
      Description copied from class: Entity
      Called on entity spawn. Used to populate the entity metadata and flags with default values.
      Overrides:
      initializeMetadata in class AgeableEntity
    • updateRotation

      public void updateRotation(float yaw, float pitch, boolean isOnGround)
      Description copied from class: Entity
      Updates an entity's rotation. Used in JavaMoveEntityRotTranslator.
      Overrides:
      updateRotation in class Entity
      Parameters:
      yaw - The new yaw of the entity.
      pitch - The new pitch of the entity.
      isOnGround - Whether the entity is currently on the ground.
    • getAdultSize

      protected float getAdultSize()
      Description copied from class: AgeableEntity
      The scale that should be used when this entity is not a baby.
      Overrides:
      getAdultSize in class AgeableEntity
    • getBabySize

      protected float getBabySize()
      Description copied from class: AgeableEntity
      The scale that should be used when this entity is a baby.
      Overrides:
      getBabySize in class AgeableEntity
    • setTameableFlags

      public void setTameableFlags(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata)
      Overrides:
      setTameableFlags in class TameableEntity
    • variantRegistry

      public JavaRegistryKey<CatEntity.BuiltInVariant> variantRegistry()
      Description copied from interface: VariantHolder
      The registry in JavaRegistries for this mob's variants. The registry can utilise the VariantHolder.reader(Class, Enum) method to create a reader to be used in RegistryCache.
      Specified by:
      variantRegistry in interface VariantHolder<VariantIntHolder.BuiltIn>
    • setBedrockVariantId

      public void setBedrockVariantId(int bedrockId)
      Description copied from interface: VariantIntHolder
      Should set the variant on bedrock's metadata. The bedrock ID has already been checked and is always valid.
      Specified by:
      setBedrockVariantId in interface VariantIntHolder
    • setResting

      public void setResting(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setCollarColor

      public void setCollarColor(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    • getFoodTag

      protected @Nullable Tag<Item> getFoodTag()
      Specified by:
      getFoodTag in class AnimalEntity
      Returns:
      the tag associated with this animal for eating food. Null for nothing or different behavior.
    • testMobInteraction

      protected @NonNull InteractiveTag testMobInteraction(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
      Overrides:
      testMobInteraction in class AnimalEntity
    • mobInteract

      protected @NonNull InteractionResult mobInteract(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
      Overrides:
      mobInteract in class AnimalEntity