Snap death messages
This commit is contained in:
parent
19bd9cb0ec
commit
3428f467d4
|
@ -2,8 +2,10 @@ package anvil.infinity.effects;
|
|||
|
||||
import anvil.infinity.Infinity;
|
||||
import anvil.infinity.SoundHelper;
|
||||
import anvil.infinity.helpers.SnapMessageHelper;
|
||||
import anvil.infinity.registry.Effects;
|
||||
import anvil.infinity.registry.Sounds;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -27,11 +29,15 @@ public class EffectSnap extends Potion {
|
|||
if (e.getEntityLiving().getActivePotionEffect(Effects.snapEffect) != null) {
|
||||
if (e.getEntityLiving().getActivePotionEffect(Effects.snapEffect).getDuration() == 1) {
|
||||
e.getEntityLiving().playSound(Sounds.snap, 5, 0);
|
||||
if (e.getEntityLiving().hasCustomName() || e.getEntityLiving() instanceof EntityPlayer) {
|
||||
SnapMessageHelper.deathMessage(e.getEntityLiving());
|
||||
}
|
||||
e.getEntityLiving().setHealth(0);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class SnapMessageHelper {
|
|||
public static MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
|
||||
public static void deathMessage(EntityLivingBase entity) {
|
||||
TextComponentString msg = new TextComponentString(entity.getName());
|
||||
TextComponentString msg = new TextComponentString(entity.getName() + " ");
|
||||
msg.appendSibling(new TextComponentTranslation("infinity.snap.death"));
|
||||
server.getPlayerList().sendMessage(msg);
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@ item.reality_stone.name=Realitätsstein
|
|||
item.soul_stone.name=Seelenstein
|
||||
item.time_stone.name=Zeitstein
|
||||
item.mind_stone.name=Gedankenstein
|
||||
infinity.snap.text=Du hättest auf den Kopf zielen sollen.
|
||||
infinity.snap.text=Du hättest auf den Kopf zielen sollen.
|
||||
infinity.snap.death=zerfiel zu Staub
|
|
@ -4,4 +4,4 @@ item.soul_stone.name=Soul Stone
|
|||
item.time_stone.name=Time Stone
|
||||
item.mind_stone.name=Mind Stone
|
||||
infinity.snap.text=You should have gone for the head.
|
||||
infinity.snap.death= died by the Snap
|
||||
infinity.snap.death=was dusted away
|
Loading…
Reference in a new issue