Interface Phantom

All Superinterfaces:
Attributable, Audience, CommandSender, Damageable, Enemy, Entity, Flying, Frictional, HoverEventSource<HoverEvent.ShowEntity>, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter

public interface Phantom extends Flying, Enemy
Represents a phantom.
  • Method Details

    • getSize

      int getSize()
      Returns:
      The size of the phantom
    • setSize

      void setSize(int sz)
      Parameters:
      sz - The new size of the phantom.
    • getSpawningEntity

      @Nullable UUID getSpawningEntity()
      Get the UUID of the entity that caused this phantom to spawn
      Returns:
      UUID
    • shouldBurnInDay

      boolean shouldBurnInDay()
      Check if this phantom will burn in the sunlight
      Specified by:
      shouldBurnInDay in interface LivingEntity
      Returns:
      True if phantom will burn in sunlight
    • setShouldBurnInDay

      void setShouldBurnInDay(boolean shouldBurnInDay)
      Set if this phantom should burn in the sunlight
      Specified by:
      setShouldBurnInDay in interface LivingEntity
      Parameters:
      shouldBurnInDay - True to burn in sunlight
    • getAnchorLocation

      @NotNull Location getAnchorLocation()
      Gets the location that this phantom circles around when not attacking a player This will be changed after attacking a player.
      Returns:
      circling location
    • setAnchorLocation

      void setAnchorLocation(@NotNull Location location)
      Sets the location that this phantom circles around when not attacking a player
      Parameters:
      location - circling location (world is ignored, will always use the entity's world)