Class ThrowableItemEntity

All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, 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(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

    • tick

      public void tick()
      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(boolean value)
      Description copied from class: Entity
      Set a boolean - whether the entity is invisible or visible
      Overrides:
      setInvisible in class Entity
      Parameters:
      value - true if the entity is invisible
    • setItem

      public void setItem(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack,?> entityMetadata)