public class DamageSource extends Object
Modifier and Type | Field and Description |
---|---|
static DamageSource |
ANVIL |
private boolean |
bypassesArmor |
static DamageSource |
CACTUS |
static DamageSource |
CRAMMING |
static DamageSource |
DRAGON_BREATH |
static DamageSource |
DROWN |
static DamageSource |
DRYOUT |
private float |
exhaustion |
private boolean |
explosive |
static DamageSource |
FALL |
static DamageSource |
FALLING_BLOCK |
private boolean |
fire |
static DamageSource |
FLY_INTO_WALL |
static DamageSource |
GENERIC |
static DamageSource |
HOT_FLOOR |
static DamageSource |
IN_FIRE |
static DamageSource |
IN_WALL |
static DamageSource |
LAVA |
static DamageSource |
LIGHTNING_BOLT |
private boolean |
magic |
static DamageSource |
MAGIC |
String |
name |
static DamageSource |
ON_FIRE |
static DamageSource |
OUT_OF_WORLD |
private boolean |
outOfWorld |
private boolean |
projectile |
private boolean |
scaleWithDifficulty |
static DamageSource |
STARVE |
static DamageSource |
SWEET_BERRY_BUSH |
private boolean |
unblockable |
static DamageSource |
WITHER |
Modifier | Constructor and Description |
---|---|
protected |
DamageSource(String name) |
public static final DamageSource IN_FIRE
public static final DamageSource LIGHTNING_BOLT
public static final DamageSource ON_FIRE
public static final DamageSource LAVA
public static final DamageSource HOT_FLOOR
public static final DamageSource IN_WALL
public static final DamageSource CRAMMING
public static final DamageSource DROWN
public static final DamageSource STARVE
public static final DamageSource CACTUS
public static final DamageSource FALL
public static final DamageSource FLY_INTO_WALL
public static final DamageSource OUT_OF_WORLD
public static final DamageSource GENERIC
public static final DamageSource MAGIC
public static final DamageSource WITHER
public static final DamageSource ANVIL
public static final DamageSource FALLING_BLOCK
public static final DamageSource DRAGON_BREATH
public static final DamageSource DRYOUT
public static final DamageSource SWEET_BERRY_BUSH
private boolean bypassesArmor
private boolean outOfWorld
private boolean unblockable
private float exhaustion
private boolean fire
private boolean projectile
private boolean scaleWithDifficulty
private boolean magic
private boolean explosive
public final String name
protected DamageSource(String name)
public static DamageSource sting(LivingEntity attacker)
public static DamageSource mob(LivingEntity attacker)
public static DamageSource mobProjectile(Entity projectile, LivingEntity attacker)
public static DamageSource player(PlayerEntity attacker)
public static DamageSource arrow(PersistentProjectileEntity projectile, @Nullable Entity attacker)
public static DamageSource trident(Entity trident, @Nullable Entity attacker)
public static DamageSource firework(FireworkRocketEntity firework, @Nullable Entity attacker)
public static DamageSource fireball(AbstractFireballEntity fireball, @Nullable Entity attacker)
public static DamageSource witherSkull(WitherSkullEntity witherSkull, Entity attacker)
public static DamageSource thrownProjectile(Entity projectile, @Nullable Entity attacker)
public static DamageSource magic(Entity magic, @Nullable Entity attacker)
public static DamageSource thorns(Entity attacker)
public static DamageSource explosion(@Nullable Explosion explosion)
public static DamageSource explosion(@Nullable LivingEntity attacker)
public static DamageSource badRespawnPoint()
public boolean isProjectile()
public DamageSource setProjectile()
public boolean isExplosive()
public DamageSource setExplosive()
public boolean bypassesArmor()
public float getExhaustion()
public boolean isOutOfWorld()
public boolean isUnblockable()
protected DamageSource setBypassesArmor()
protected DamageSource setOutOfWorld()
protected DamageSource setUnblockable()
protected DamageSource setFire()
public Text getDeathMessage(LivingEntity entity)
public boolean isFire()
public String getName()
public DamageSource setScaledWithDifficulty()
public boolean isScaledWithDifficulty()
public boolean getMagic()
public DamageSource setUsesMagic()
public boolean isSourceCreativePlayer()