Class AbstractDamageSourceBuilder<T extends DamageSource,B extends DamageSource.DamageSourceBuilder<T,B>>  
- All Implemented Interfaces:
- AbstractBuilder<T>,- DamageSource.DamageSourceBuilder<T,,- B> - Builder<T,,- B> - CopyableBuilder<T,,- B> - ResettableBuilder<T,- B> 
- Direct Known Subclasses:
- AbstractEntityDamageSource.AbstractEntityDamageSourceBuilder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected DamageTypeprotected @Nullable Doubleprotected booleanprotected booleanprotected booleanprotected boolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabsolute()Sets whether thisDamageSource's damage is absolute and will ignore potion effects and enchantments.Sets thisDamageSourceas dealing damage that bypasses armor modifiers.creative()Sets thisDamageSourceas considered to damage creative, or otherwise "normally unharmable" players.exhaustion(double exhaustion) Sets the amount of exhaustion thisDamageSourcewill add to the entity, generally only to players.Sets thisDamageSourceas an explosion.fire()Sets thisDamageSource's damage to be considered "fire" damage.Resets this builder to the values of the given built object.magical()Sets thisDamageSourceas considered to be magical damage.reset()Resets this builder to a "default" state such that there is no remaining data to set.Sets thisDamageSource's damage to be scaled byDifficulty.type(DamageType damageType) Sets theDamageTypeof this source.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.spongepowered.api.event.cause.entity.damage.source.DamageSource.DamageSourceBuilderbuild, type
- 
Field Details- 
scalesprotected boolean scales
- 
bypassesprotected boolean bypasses
- 
explosionprotected boolean explosion
- 
absoluteprotected boolean absolute
- 
magicalprotected boolean magical
- 
creativeprotected boolean creative
- 
fireprotected boolean fire
- 
exhaustion
- 
damageType
 
- 
- 
Constructor Details- 
AbstractDamageSourceBuilderpublic AbstractDamageSourceBuilder()
 
- 
- 
Method Details- 
fireDescription copied from interface:DamageSource.DamageSourceBuilderSets thisDamageSource's damage to be considered "fire" damage.- Specified by:
- firein interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
scalesWithDifficultyDescription copied from interface:DamageSource.DamageSourceBuilderSets thisDamageSource's damage to be scaled byDifficulty.- Specified by:
- scalesWithDifficultyin interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
bypassesArmorDescription copied from interface:DamageSource.DamageSourceBuilderSets thisDamageSourceas dealing damage that bypasses armor modifiers.This sets the exhaustion increase caused by this source to 0. You can override this with DamageSource.DamageSourceBuilder.exhaustion(double).- Specified by:
- bypassesArmorin interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
explosionDescription copied from interface:DamageSource.DamageSourceBuilderSets thisDamageSourceas an explosion.- Specified by:
- explosionin interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
absoluteDescription copied from interface:DamageSource.DamageSourceBuilderSets whether thisDamageSource's damage is absolute and will ignore potion effects and enchantments.This sets the exhaustion increase caused by this source to 0. You can override this with DamageSource.DamageSourceBuilder.exhaustion(double).- Specified by:
- absolutein interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
magicalDescription copied from interface:DamageSource.DamageSourceBuilderSets thisDamageSourceas considered to be magical damage. An example is potions.- Specified by:
- magicalin interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
creativeDescription copied from interface:DamageSource.DamageSourceBuilderSets thisDamageSourceas considered to damage creative, or otherwise "normally unharmable" players.- Specified by:
- creativein interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder
 
- 
exhaustionDescription copied from interface:DamageSource.DamageSourceBuilderSets the amount of exhaustion thisDamageSourcewill add to the entity, generally only to players.In vanilla gameplay, the default is 0.1, unless if the damage is absolute or bypasses armor, where the exhaustion gets set to 0. This builder follows this mechanic, but if you set the exhaustion through this method that will be overridden. If you don't set this exhaustion manually, calling DamageSource.DamageSourceBuilder.absolute()orDamageSource.DamageSourceBuilder.bypassesArmor()will set this 0 and if you don't this will default to 0.1.- Specified by:
- exhaustionin interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Parameters:
- exhaustion- The amount of exhaustion to add to the entity
- Returns:
- This builder
 
- 
typeDescription copied from interface:DamageSource.DamageSourceBuilderSets theDamageTypeof this source.This is required to be set. - Specified by:
- typein interface- DamageSource.DamageSourceBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Parameters:
- damageType- The desired damage type
- Returns:
- This builder
 
- 
fromDescription copied from interface:CopyableBuilderResets this builder to the values of the given built object.- Specified by:
- fromin interface- CopyableBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Parameters:
- value- The built object
- Returns:
- This builder, for chaining
 
- 
resetDescription copied from interface:BuilderResets this builder to a "default" state such that there is no remaining data to set. This is to be the presumed "default" state.- Specified by:
- resetin interface- Builder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Specified by:
- resetin interface- ResettableBuilder<T extends DamageSource,- B extends DamageSource.DamageSourceBuilder<T, - B>> 
- Returns:
- This builder, for chaining
 
 
-