Tweaks to damage. It now uses the DamageSource correctly
This commit is contained in:
parent
305b5e165f
commit
437dc1b96e
4 changed files with 70 additions and 101 deletions
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue