Package org.spongepowered.api.effect
Interface VanishState
public interface VanishState
Represents the state of an 
Entity's vanish state.
 Accessible through Keys.VANISH_STATE- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionaffectMonsterSpawning(boolean affectsMonsterSpawning) Ifinvisible()returns true, this will return theVanishStatewith the desired flag.booleanGets ifaffectsMonsterSpawning()returnsfalse, the vanishedEntitywill not spawn monsters or affect near by monster spawners.createParticles(boolean createParticles) Ifinvisible()returns true, this will return theVanishStatewith the desired flag ofcreatesParticles().createSounds(boolean createSounds) Ifinvisible()returns true, this will return theVanishStatewith the desired flag ofcreatesSounds().booleanGets if theEntitywill produce particles from various actions that occur whileinvisible()istrue.booleanignoreCollisions(boolean ignoresCollisions) Ifinvisible()returns true, this will return theVanishStatewith the desired flag ofignoresCollisions().booleanGets if theEntitywill ignore collisions.booleanGets whether the state is visible.booleanGets if theEntitywill trigger vibrations from various actions while vanished.triggerVibrations(boolean triggerVibrations) Ifinvisible()returns true, this will return theVanishStatewith the desired flag replacingtriggerVibrations().booleanGets if theEntitywill be untargetable by entity ai.untargetable(boolean untargetable) Ifinvisible()returns true, this will return theVanishStatewith the desired flag ofignoresCollisions().unvanish()static VanishStateAVanishStatethat is invisible with the following defaults:invisible()=falseaffectsMonsterSpawning()=trueuntargetable()=falsecreatesSounds()=truecreatesParticles()=truetriggerVibrations()=falsevanish()static VanishStatevanished()Gets a vanished state viavanish()with the following defaults:invisible()=trueaffectsMonsterSpawning()=falseuntargetable()=truecreatesSounds()=falsecreatesParticles()=falsetriggerVibrations()=false
- 
Method Details- 
vanishedGets a vanished state viavanish()with the following defaults:- invisible()=- true
- affectsMonsterSpawning()=- false
- untargetable()=- true
- createsSounds()=- false
- createsParticles()=- false
- triggerVibrations()=- false
 - Returns:
- A vanished state with the provided defaults
 
- 
unvanishedAVanishStatethat is invisible with the following defaults:- invisible()=- false
- affectsMonsterSpawning()=- true
- untargetable()=- false
- createsSounds()=- true
- createsParticles()=- true
- triggerVibrations()=- false
 - Returns:
- A visible state with the provided defaults
 
- 
invisibleboolean invisible()Gets whether the state is visible. If anEntityis visible, then other aspects of this state will be ignored, such asignoresCollisions(),untargetable(), etc.- Returns:
- Whether the Entityis visible
 
- 
vanishVanishState vanish()Gets a vanishedstatewithignoresCollisions()anduntargetable()set totrue. If the state is alreadyinvisible(), then the same state is returned.- Returns:
- The vanished state
 
- 
unvanishVanishState unvanish()Gets a visible stateVanishStatewithignoresCollisions()anduntargetable()set tofalse. If the state is alreadyinvisible()beingfalse, then the same state is returned.- Returns:
- The visible state
 
- 
ignoresCollisionsboolean ignoresCollisions()Gets if theEntitywill ignore collisions. In cases whereinvisible()isfalse, this will returnfalse.- Returns:
- Whether collisions will be ignored
 
- 
ignoreCollisionsIfinvisible()returns true, this will return theVanishStatewith the desired flag ofignoresCollisions().- Parameters:
- ignoresCollisions- Whether collisions will be ignored
- Returns:
- The new VanishState, the value changed
 
- 
untargetableboolean untargetable()Gets if theEntitywill be untargetable by entity ai. In cases whereinvisible()isfalse, this will returnfalse.- Returns:
- Whether the Entitywill be untargetable
 
- 
untargetableIfinvisible()returns true, this will return theVanishStatewith the desired flag ofignoresCollisions().- Parameters:
- untargetable- Whether the entity can be targeted by AI
- Returns:
- The new VanishState, the value changed
 
- 
affectsMonsterSpawningboolean affectsMonsterSpawning()Gets ifaffectsMonsterSpawning()returnsfalse, the vanishedEntitywill not spawn monsters or affect near by monster spawners.Note that this flag works in conjunction with Keys.AFFECTS_SPAWNINGsuch that either one beingfalsewill disable spawning.- Returns:
- Whether the Entitywill affect monster spawning
 
- 
affectMonsterSpawningIfinvisible()returns true, this will return theVanishStatewith the desired flag.Note that this flag works in conjunction with Keys.AFFECTS_SPAWNINGsuch that either one being false will disable spawning.- Parameters:
- affectsMonsterSpawning- Whether the- Entitywill affect monster spawning
- Returns:
- The new VanishState
 
- 
createsSoundsboolean createsSounds()- Returns:
- Whether the Entitywill produce sounds while invisible
 
- 
createSoundsIfinvisible()returns true, this will return theVanishStatewith the desired flag ofcreatesSounds().- Parameters:
- createSounds- Whether the- Entitywill produce sounds
- Returns:
- The new VanishState
 
- 
createsParticlesboolean createsParticles()Gets if theEntitywill produce particles from various actions that occur whileinvisible()istrue.- Returns:
- Whether the Entitywill produce particles while invisible
 
- 
createParticlesIfinvisible()returns true, this will return theVanishStatewith the desired flag ofcreatesParticles().- Parameters:
- createParticles- Whether the- Entitywill produce particles
- Returns:
- The new VanishState
 
- 
triggerVibrationsboolean triggerVibrations()Gets if theEntitywill trigger vibrations from various actions while vanished. These vibrations are generally measured/reacted bySculkSensorsand potentially create particles.- Returns:
- Whether the Entitywill trigger vibrations while invisible
 
- 
triggerVibrationsIfinvisible()returns true, this will return theVanishStatewith the desired flag replacingtriggerVibrations().- Parameters:
- triggerVibrations- Whether the- Entitywill trigger vibrations while invisible
- Returns:
- The new VanishState
 
 
-