Interface VanishState


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

    • vanished Link icon

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

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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