Interface VanishState


public interface VanishState
Represents the state of an Entity's vanish state. Accessible through Keys.VANISH_STATE
  • Method Details

    • vanished

      static VanishState vanished()
      Gets a vanished state via vanish() with the following defaults:
      Returns:
      A vanished state with the provided defaults
    • unvanished

      static VanishState unvanished()
      A VanishState that is invisible with the following defaults:
      Returns:
      A visible state with the provided defaults
    • invisible

      boolean invisible()
      Gets whether the state is visible. If an Entity is visible, then other aspects of this state will be ignored, such as ignoresCollisions(), untargetable(), etc.
      Returns:
      Whether the Entity is visible
    • vanish

      VanishState vanish()
      Gets a vanished state with ignoresCollisions() and untargetable() set to true. If the state is already invisible(), then the same state is returned.
      Returns:
      The vanished state
    • unvanish

      VanishState unvanish()
      Gets a visible state VanishState with ignoresCollisions() and untargetable() set to false. If the state is already invisible() being false, then the same state is returned.
      Returns:
      The visible state
    • ignoresCollisions

      boolean ignoresCollisions()
      Gets if the Entity will ignore collisions. In cases where invisible() is false, this will return false.
      Returns:
      Whether collisions will be ignored
    • ignoreCollisions

      VanishState ignoreCollisions(boolean ignoresCollisions)
      If invisible() returns true, this will return the VanishState with the desired flag of ignoresCollisions().
      Parameters:
      ignoresCollisions - Whether collisions will be ignored
      Returns:
      The new VanishState, the value changed
    • untargetable

      boolean untargetable()
      Gets if the Entity will be untargetable by entity ai. In cases where invisible() is false, this will return false.
      Returns:
      Whether the Entity will be untargetable
    • untargetable

      VanishState untargetable(boolean untargetable)
      If invisible() returns true, this will return the VanishState with the desired flag of ignoresCollisions().
      Parameters:
      untargetable - Whether the entity can be targeted by AI
      Returns:
      The new VanishState, the value changed
    • affectsMonsterSpawning

      boolean affectsMonsterSpawning()
      Gets if affectsMonsterSpawning() returns false, the vanished Entity will not spawn monsters or affect near by monster spawners.

      Note that this flag works in conjunction with Keys.AFFECTS_SPAWNING such that either one being false will disable spawning.

      Returns:
      Whether the Entity will affect monster spawning
    • affectMonsterSpawning

      VanishState affectMonsterSpawning(boolean affectsMonsterSpawning)
      If invisible() returns true, this will return the VanishState with the desired flag.

      Note that this flag works in conjunction with Keys.AFFECTS_SPAWNING such that either one being false will disable spawning.

      Parameters:
      affectsMonsterSpawning - Whether the Entity will affect monster spawning
      Returns:
      The new VanishState
    • createsSounds

      boolean createsSounds()
      Gets if the Entity will produce sounds from various actions that occur while invisible() is true.
      Returns:
      Whether the Entity will produce sounds while invisible
    • createSounds

      VanishState createSounds(boolean createSounds)
      If invisible() returns true, this will return the VanishState with the desired flag of createsSounds().
      Parameters:
      createSounds - Whether the Entity will produce sounds
      Returns:
      The new VanishState
    • createsParticles

      boolean createsParticles()
      Gets if the Entity will produce particles from various actions that occur while invisible() is true.
      Returns:
      Whether the Entity will produce particles while invisible
    • createParticles

      VanishState createParticles(boolean createParticles)
      If invisible() returns true, this will return the VanishState with the desired flag of createsParticles().
      Parameters:
      createParticles - Whether the Entity will produce particles
      Returns:
      The new VanishState
    • triggerVibrations

      boolean triggerVibrations()
      Gets if the Entity will trigger vibrations from various actions while vanished. These vibrations are generally measured/reacted by SculkSensors and potentially create particles.
      Returns:
      Whether the Entity will trigger vibrations while invisible
    • triggerVibrations

      VanishState triggerVibrations(boolean triggerVibrations)
      If invisible() returns true, this will return the VanishState with the desired flag replacing triggerVibrations().
      Parameters:
      triggerVibrations - Whether the Entity will trigger vibrations while invisible
      Returns:
      The new VanishState