Backported various death messages.
This commit is contained in:
parent
00e3c2e252
commit
eac7c5a5d9
|
@ -16,6 +16,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -352,7 +353,7 @@ public class EntitySlider extends EntityFlying implements IAetherBoss {
|
|||
@Override
|
||||
public void applyEntityCollision(Entity entity) {
|
||||
if (this.isAwake() && this.isMoving()) {
|
||||
boolean flag = entity.attackEntityFrom(DamageSource.causeMobDamage(this), 6);
|
||||
boolean flag = entity.attackEntityFrom(new EntityDamageSource("crush", this), 6);
|
||||
|
||||
if (flag && entity instanceof EntityLivingBase) {
|
||||
EntityLivingBase collidedEntity = (EntityLivingBase) entity;
|
||||
|
|
|
@ -17,6 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -296,7 +297,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss {
|
|||
Entity entity = (Entity) entityList.get(ammount);
|
||||
|
||||
if (entity instanceof EntityLivingBase && !entity.isImmuneToFire()) {
|
||||
entity.attackEntityFrom(DamageSource.causeMobDamage(this), 10);
|
||||
entity.attackEntityFrom(new EntityDamageSource("incineration", this), 10);
|
||||
entity.setFire(15);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,7 @@ import net.minecraft.entity.SharedMonsterAttributes;
|
|||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
@ -24,6 +20,8 @@ import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
|||
|
||||
public class EntityCrystal extends EntityFlying implements IEntityAdditionalSpawnData {
|
||||
|
||||
public Entity shootingEntity;
|
||||
|
||||
public float[] sinage = new float[3];
|
||||
|
||||
public double smotionX;
|
||||
|
@ -153,6 +151,7 @@ public class EntityCrystal extends EntityFlying implements IEntityAdditionalSpaw
|
|||
@Override
|
||||
public void applyEntityCollision(Entity entity) {
|
||||
super.applyEntityCollision(entity);
|
||||
boolean flag;
|
||||
|
||||
if (entity instanceof EntityCrystal && this.worldObj.difficultySetting == EnumDifficulty.HARD) {
|
||||
EntityCrystal crystal = (EntityCrystal) entity;
|
||||
|
@ -167,14 +166,23 @@ public class EntityCrystal extends EntityFlying implements IEntityAdditionalSpaw
|
|||
}
|
||||
} else if (entity instanceof EntityLivingBase) {
|
||||
if (this.type == EnumCrystalType.FIRE && !(entity instanceof IAetherBoss) && !(entity instanceof EntityFireMinion)) {
|
||||
if (entity.attackEntityFrom(DamageSource.causeMobDamage(this), 5.0F)) {
|
||||
if (this.shootingEntity != null) {
|
||||
flag = entity.attackEntityFrom(new EntityDamageSourceIndirect("incineration_firo", this, this.shootingEntity).setProjectile(), 5);
|
||||
}
|
||||
else {
|
||||
flag = entity.attackEntityFrom(new EntityDamageSource("incineration", this).setProjectile(), 5);
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
this.explode();
|
||||
this.expire();
|
||||
this.setDead();
|
||||
entity.setFire(100);
|
||||
}
|
||||
} else if (this.type == EnumCrystalType.ICE && this.wasHit()) {
|
||||
if (entity.attackEntityFrom(DamageSource.causeMobDamage(this), 5.0F)) {
|
||||
flag = entity.attackEntityFrom(new EntityDamageSourceIndirect("icey_ball", this, this.shootingEntity).setProjectile(), 5);
|
||||
|
||||
if (flag) {
|
||||
this.explode();
|
||||
this.expire();
|
||||
this.setDead();
|
||||
|
@ -186,7 +194,9 @@ public class EntityCrystal extends EntityFlying implements IEntityAdditionalSpaw
|
|||
this.setDead();
|
||||
entity.attackEntityFrom(DamageSource.causeMobDamage(this), 5.0F);
|
||||
} else if (this.type == EnumCrystalType.THUNDER && entity == this.getAttackTarget()) {
|
||||
if (entity.attackEntityFrom(DamageSource.causeMobDamage(this), 1.0F)) {
|
||||
flag = entity.attackEntityFrom(new EntityDamageSourceIndirect("lightning_ball", this, this.shootingEntity).setProjectile(), 5);
|
||||
|
||||
if (flag) {
|
||||
this.moveTowardsTarget(entity, -0.3D);
|
||||
}
|
||||
}
|
||||
|
@ -210,6 +220,7 @@ public class EntityCrystal extends EntityFlying implements IEntityAdditionalSpaw
|
|||
this.smotionZ = var3.zCoord;
|
||||
}
|
||||
|
||||
this.shootingEntity = source.getSourceOfDamage();
|
||||
this.wasHit = true;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -389,7 +389,13 @@ subtitles.aeboss.slider.death=Slider breaks
|
|||
subtitles.aeboss.sun_spirit.shoot=Sun Spirit shoots
|
||||
|
||||
# Death messages
|
||||
death.attack.inebriation=%1$s was inebriated by Cockatrice
|
||||
death.attack.inebriation=%1$s was inebriated
|
||||
death.attack.inebriation_indirect=%1$s was inebriated by %2$s
|
||||
death.attack.crush=%1$s was crushed by %2$s
|
||||
death.attack.incineration=%1$s was incinerated by %2$s
|
||||
death.attack.incineration_firo=%1$s was incinerated by %2$s's Fire Ball
|
||||
death.attack.icey_ball=%1$s was chilled by %2$s's Icey Ball
|
||||
death.attack.lightning_ball=%1$s was zapped by %2$s's Thunder Ball
|
||||
|
||||
# Gui messages
|
||||
gui.sun_altar.message=The sun spirit has no power over this realm.
|
||||
|
|
Loading…
Reference in a new issue