Class ThrowableItemEntity

All Implemented Interfaces:
Tickable
Direct Known Subclasses:
ThrownPotionEntity

public class ThrowableItemEntity extends ThrowableEntity
Used as a class for any projectile entity that looks like an item
  • Constructor Details

    • ThrowableItemEntity

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

    • 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
    • setInvisible

      protected void setInvisible(GeyserSession session, boolean value)
      Description copied from class: Entity
      Set a boolean - whether the entity is invisible or visible
      Overrides:
      setInvisible in class Entity
      Parameters:
      session - the Geyser session
      value - true if the entity is invisible