Java 类net.minecraft.server.EntityEnderDragon 实例源码

项目:Almura-Server    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || entity instanceof EntityHuman
            || entity instanceof EntityProjectile
            || entity instanceof EntityEnderDragon
            || entity instanceof EntityComplexPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeather
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworks )
    {
        return true;
    }

    return false;
}
项目:Tweakkit-Server    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || entity instanceof EntityHuman
            || entity instanceof EntityProjectile
            || entity instanceof EntityEnderDragon
            || entity instanceof EntityComplexPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeather
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworks )
    {
        return true;
    }

    return false;
}
项目:SpigotSource    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || entity instanceof EntityHuman
            || entity instanceof EntityProjectile
            || entity instanceof EntityEnderDragon
            || entity instanceof EntityComplexPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeather
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworks )
    {
        return true;
    }

    return false;
}
项目:CraftBukkit    文件:CraftLivingEntity.java   
public void damage(double amount, org.bukkit.entity.Entity source) {
    DamageSource reason = DamageSource.GENERIC;

    if (source instanceof HumanEntity) {
        reason = DamageSource.playerAttack(((CraftHumanEntity) source).getHandle());
    } else if (source instanceof LivingEntity) {
        reason = DamageSource.mobAttack(((CraftLivingEntity) source).getHandle());
    }

    if (entity instanceof EntityEnderDragon) {
        ((EntityEnderDragon) entity).dealDamage(reason, (float) amount);
    } else {
        entity.damageEntity(reason, (float) amount);
    }
}
项目:Almura-Server    文件:CraftLivingEntity.java   
public void damage(double amount, org.bukkit.entity.Entity source) {
    DamageSource reason = DamageSource.GENERIC;

    if (source instanceof HumanEntity) {
        reason = DamageSource.playerAttack(((CraftHumanEntity) source).getHandle());
    } else if (source instanceof LivingEntity) {
        reason = DamageSource.mobAttack(((CraftLivingEntity) source).getHandle());
    }

    if (entity instanceof EntityEnderDragon) {
        ((EntityEnderDragon) entity).dealDamage(reason, (float) amount);
    } else {
        entity.damageEntity(reason, (float) amount);
    }
}
项目:Tweakkit-Server    文件:CraftLivingEntity.java   
public void damage(double amount, org.bukkit.entity.Entity source) {
    DamageSource reason = DamageSource.GENERIC;

    if (source instanceof HumanEntity) {
        reason = DamageSource.playerAttack(((CraftHumanEntity) source).getHandle());
    } else if (source instanceof LivingEntity) {
        reason = DamageSource.mobAttack(((CraftLivingEntity) source).getHandle());
    }

    if (entity instanceof EntityEnderDragon) {
        ((EntityEnderDragon) entity).dealDamage(reason, (float) amount);
    } else {
        entity.damageEntity(reason, (float) amount);
    }
}
项目:Craft-city    文件:CraftLivingEntity.java   
public void damage(int amount, org.bukkit.entity.Entity source) {
    DamageSource reason = DamageSource.GENERIC;

    if (source instanceof HumanEntity) {
        reason = DamageSource.playerAttack(((CraftHumanEntity) source).getHandle());
    } else if (source instanceof LivingEntity) {
        reason = DamageSource.mobAttack(((CraftLivingEntity) source).getHandle());
    }

    if (entity instanceof EntityEnderDragon) {
        ((EntityEnderDragon) entity).dealDamage(reason, amount);
    } else {
        entity.damageEntity(reason, amount);
    }
}
项目:CraftBukkit    文件:CraftEnderDragon.java   
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
    super(server, entity);
}
项目:CraftBukkit    文件:CraftEnderDragon.java   
@Override
public EntityEnderDragon getHandle() {
    return (EntityEnderDragon) entity;
}
项目:CraftBukkit    文件:CraftComplexPart.java   
public ComplexLivingEntity getParent() {
    return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}
项目:Craftbukkit    文件:CraftEnderDragon.java   
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
    super(server, entity);
}
项目:Craftbukkit    文件:CraftEnderDragon.java   
@Override
public EntityEnderDragon getHandle() {
    return (EntityEnderDragon) entity;
}
项目:Craftbukkit    文件:CraftComplexPart.java   
public ComplexLivingEntity getParent() {
    return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}
项目:Almura-Server    文件:CraftEnderDragon.java   
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
    super(server, entity);
}
项目:Almura-Server    文件:CraftEnderDragon.java   
@Override
public EntityEnderDragon getHandle() {
    return (EntityEnderDragon) entity;
}
项目:Almura-Server    文件:CraftComplexPart.java   
public ComplexLivingEntity getParent() {
    return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}
项目:Tweakkit-Server    文件:CraftEnderDragon.java   
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
    super(server, entity);
}
项目:Tweakkit-Server    文件:CraftEnderDragon.java   
@Override
public EntityEnderDragon getHandle() {
    return (EntityEnderDragon) entity;
}
项目:Tweakkit-Server    文件:CraftComplexPart.java   
public ComplexLivingEntity getParent() {
    return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}
项目:SpigotSource    文件:CraftEnderDragon.java   
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
    super(server, entity);
}
项目:SpigotSource    文件:CraftEnderDragon.java   
@Override
public EntityEnderDragon getHandle() {
    return (EntityEnderDragon) entity;
}
项目:SpigotSource    文件:CraftEnderDragon.java   
@Override
public Phase getPhase() {
    return Phase.values()[getHandle().getDataWatcher().get(EntityEnderDragon.PHASE)];
}
项目:SpigotSource    文件:CraftComplexPart.java   
public ComplexLivingEntity getParent() {
    return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}
项目:Craft-city    文件:CraftEnderDragon.java   
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
    super(server, entity);
}
项目:Craft-city    文件:CraftEnderDragon.java   
@Override
public EntityEnderDragon getHandle() {
    return (EntityEnderDragon) entity;
}
项目:Craft-city    文件:CraftComplexPart.java   
public ComplexLivingEntity getParent() {
    return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}