All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity

public class CatEntity extends TameableEntity
  • Constructor Details

    • CatEntity

      public CatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw)
  • 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(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata)
      Overrides:
      setTameableFlags in class TameableEntity
    • setCatVariant

      public void setCatVariant(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    • setResting

      public void setResting(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setCollarColor

      public void setCollarColor(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    • canEat

      public boolean canEat(Item item)
      Overrides:
      canEat in class AnimalEntity
      Returns:
      true if this is a valid item to breed with for this animal.
    • testMobInteraction

      @Nonnull protected InteractiveTag testMobInteraction(@Nonnull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand, @Nonnull GeyserItemStack itemInHand)
      Overrides:
      testMobInteraction in class AnimalEntity
    • mobInteract

      @Nonnull protected InteractionResult mobInteract(@Nonnull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand, @Nonnull GeyserItemStack itemInHand)
      Overrides:
      mobInteract in class AnimalEntity