Class AbstractHorseEntity

All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, Leashable, ClientVehicle
Direct Known Subclasses:
CamelEntity, ChestedHorseEntity, HorseEntity, SkeletonHorseEntity, ZombieHorseEntity

public class AbstractHorseEntity extends AnimalEntity implements ClientVehicle
  • Constructor Details

    • AbstractHorseEntity

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

    • getContainerBaseSize

      protected int getContainerBaseSize()
    • spawnEntity

      public void spawnEntity()
      Overrides:
      spawnEntity in class Entity
    • updateSaddled

      public void updateSaddled(boolean saddled)
      Overrides:
      updateSaddled in class LivingEntity
    • calculateAttribute

      protected org.cloudburstmc.protocol.bedrock.data.AttributeData calculateAttribute(org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.Attribute javaAttribute, GeyserAttributeType type)
      Description copied from class: LivingEntity
      Calculates the complete attribute value to send to Bedrock. Will be overriden if attributes need to be cached.
      Overrides:
      calculateAttribute in class LivingEntity
    • doesJumpDismount

      public boolean doesJumpDismount()
      Description copied from class: Entity
      If true, the entity can be dismounted by pressing jump.
      Overrides:
      doesJumpDismount in class Entity
      Returns:
      whether the entity can be dismounted when pressing jump.
    • setHorseFlags

      public void setHorseFlags(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata 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
    • testHorseInteraction

      protected final @NonNull InteractiveTag testHorseInteraction(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
    • mobInteract

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

      protected final @NonNull InteractionResult mobHorseInteract(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
    • testSaddle

      protected boolean testSaddle(@NonNull GeyserItemStack itemInHand)
    • testForChest

      protected boolean testForChest(@NonNull GeyserItemStack itemInHand)
    • additionalTestForInventoryOpen

      protected boolean additionalTestForInventoryOpen(@NonNull GeyserItemStack itemInHand)
    • testUndeadHorseInteraction

      protected final InteractiveTag testUndeadHorseInteraction(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
    • undeadHorseInteract

      protected final InteractionResult undeadHorseInteract(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
    • canUseSlot

      protected boolean canUseSlot(org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot slot)
      Overrides:
      canUseSlot in class LivingEntity
    • getVehicleComponent

      public VehicleComponent<?> getVehicleComponent()
      Specified by:
      getVehicleComponent in interface ClientVehicle
    • getRiddenInput

      public org.cloudburstmc.math.vector.Vector3f getRiddenInput(org.cloudburstmc.math.vector.Vector2f input)
      Specified by:
      getRiddenInput in interface ClientVehicle
    • getVehicleSpeed

      public float getVehicleSpeed()
      Specified by:
      getVehicleSpeed in interface ClientVehicle
    • isClientControlled

      public boolean isClientControlled()
      Specified by:
      isClientControlled in interface ClientVehicle