Class FishingHookEntity

All Implemented Interfaces:
Tickable

public class FishingHookEntity extends ThrowableEntity
  • Constructor Details

    • FishingHookEntity

      public FishingHookEntity(long entityId, long geyserId, EntityType entityType, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, com.nukkitx.math.vector.Vector3f rotation, PlayerEntity owner)
  • Method Details

    • updateBedrockMetadata

      public void updateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata, GeyserSession session)
      Description copied from class: Entity
      Applies the Java metadata to the local Bedrock metadata copy
      Overrides:
      updateBedrockMetadata in class Entity
      Parameters:
      entityMetadata - the Java entity metadata
      session - GeyserSession
    • moveAbsoluteImmediate

      protected void moveAbsoluteImmediate(GeyserSession session, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f rotation, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsoluteImmediate in class ThrowableEntity
    • tick

      public void tick(GeyserSession session)
      Description copied from class: ThrowableEntity
      Updates the position for the Bedrock client. Java clients assume the next positions of moving items. Bedrock needs to be explicitly told positions
      Specified by:
      tick in interface Tickable
      Overrides:
      tick in class ThrowableEntity
    • getGravity

      protected float getGravity(GeyserSession session)
      Description copied from class: ThrowableEntity
      Get the gravity of this entity type. Used for applying gravity while the entity is in motion.
      Overrides:
      getGravity in class ThrowableEntity
      Parameters:
      session - the session of the Bedrock client.
      Returns:
      the amount of gravity to apply to this entity while in motion.
    • isInAir

      protected boolean isInAir(GeyserSession session)
      Parameters:
      session - the session of the Bedrock client.
      Returns:
      true if this entity is currently in air.
    • getDrag

      protected float getDrag(GeyserSession session)
      Overrides:
      getDrag in class ThrowableEntity
      Parameters:
      session - the session of the Bedrock client.
      Returns:
      the drag that should be multiplied to the entity's motion