Class AnimalEntity

All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, Leashable
Direct Known Subclasses:
AbstractHorseEntity, ArmadilloEntity, AxolotlEntity, BeeEntity, FoxEntity, FrogEntity, GoatEntity, HoglinEntity, OcelotEntity, PandaEntity, PolarBearEntity, RabbitEntity, SheepEntity, SnifferEntity, StriderEntity, TameableEntity, TemperatureVariantAnimal, TurtleEntity

public abstract class AnimalEntity extends AgeableEntity
  • Constructor Details

    • AnimalEntity

      public AnimalEntity(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

    • canEat

      protected final boolean canEat(GeyserItemStack itemStack)
    • getFoodTag

      protected abstract @Nullable Tag<Item> getFoodTag()
      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 MobEntity
    • mobInteract

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