Class PlayerProjectile

All Implemented Interfaces:
Sound.Emitter, HoverEventSource<HoverEvent.ShowEntity>, Shape, EventHandler<EntityEvent>, EquipmentHandler, PermissionHandler, Snapshotable, Taggable, TagReadable, TagWritable, Tickable, Schedulable, Viewable

public class PlayerProjectile extends LivingEntity
  • Constructor Details

  • Method Details

    • shoot

      public void shoot(Point from, double power, double spread)
    • setInstance

      public CompletableFuture<Void> setInstance(@NotNull @NotNull Instance instance, @NotNull @NotNull Pos spawnPosition)
      Description copied from class: Entity
      Changes the entity instance, i.e. spawns it.
      Overrides:
      setInstance in class Entity
      Parameters:
      instance - the new instance of the entity
      spawnPosition - the spawn position for the entity.
      Returns:
      a CompletableFuture called once the entity's instance has been set, this is due to chunks needing to load
    • shoot

      public void shoot(@NotNull @NotNull Point from, @NotNull @NotNull Point to, double power, double spread)
    • refreshPosition

      public void refreshPosition(@NotNull @NotNull Pos newPosition)
      Overrides:
      refreshPosition in class Entity
    • tick

      public void tick(long time)
      Description copied from class: Entity
      Updates the entity, called every tick.

      Ignored if Entity.getInstance() returns null.

      Specified by:
      tick in interface Tickable
      Overrides:
      tick in class Entity
      Parameters:
      time - the update time in milliseconds