Class FishingHookEntity

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

public class FishingHookEntity extends ProjectileEntity
  • Constructor Details

  • Method Details

    • despawnEntity

      public void despawnEntity()
      Description copied from class: Entity
      Despawns the entity
      Overrides:
      despawnEntity in class ProjectileEntity
    • markRetrievedByClient

      public void markRetrievedByClient()
      Called when the Bedrock client uses its rod while this hook is out. The client removes its own hook right away and assumes the retrieve succeeds. When a plugin cancels the retrieve, Java keeps the hook and never sends anything that brings it back, so the hook is respawned on the next movement Java sends for it. A hook at rest only gets Java's periodic position sync, so that can take up to three seconds. Geyser's own projectile ticking must not trigger the respawn, since a successful retrieve's removal can still be in flight.
    • moveRelativeRaw

      public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelativeRaw in class ProjectileEntity
    • moveAbsoluteRaw

      public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsoluteRaw in class ProjectileEntity
    • setHookedEntity

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

      protected void moveAbsoluteImmediate(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsoluteImmediate in class ProjectileEntity
    • tick

      public void tick()
      Description copied from class: ProjectileEntity
      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 ProjectileEntity
    • getGravity

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

      protected boolean isInAir()
      Returns:
      true if this entity is currently in air.
    • getDrag

      protected float getDrag()
      Overrides:
      getDrag in class ProjectileEntity
      Returns:
      the drag that should be multiplied to the entity's motion
    • getBedrockOwnerId

      public long getBedrockOwnerId()
    • getBedrockTargetId

      public long getBedrockTargetId()