Tweaks to damage. It now uses the DamageSource correctly

This commit is contained in:
Nick 2015-12-01 23:35:09 -08:00
parent 305b5e165f
commit 437dc1b96e
4 changed files with 70 additions and 101 deletions

View file

@ -1,6 +1,10 @@
package WayofTime.bloodmagic.api;
import WayofTime.bloodmagic.util.helper.TextHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.DamageSource;
import net.minecraft.util.IChatComponent;
public class DamageSourceBloodMagic extends DamageSource {
@ -8,5 +12,11 @@ public class DamageSourceBloodMagic extends DamageSource {
super("bloodMagic");
setDamageBypassesArmor();
setDamageIsAbsolute();
}
@Override
public IChatComponent getDeathMessage(EntityLivingBase livingBase) {
return new ChatComponentText(TextHelper.localizeEffect("chat.BloodMagic.damageSource", livingBase.getName()));
}
}