blob: b92ee7bd60926874585d8fba7377485a8740bbc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package fyresmodjam.blessings.marks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.IRangedAttackMob;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class HuntingMark extends Mark {
@Override
public String name() {
return "Hunting";
}
@Override
public String description() {
return "BENEFIT - Deal greatly increased damage with projectile weapons\nDRAWBACK - Deal less damage with all other weapons";
}
@Override
public void correctBlessing(Entity ent) {
if (!(ent instanceof IRangedAttackMob)) {
ent.getEntityData().setString("Blessing",
"MarkWar");
}
}
@Override
public float onOutgoingDamage(LivingHurtEvent event,
float damageMultiplier) {
if (event.getSource().isProjectile()) {
return damageMultiplier + 0.4f;
}
return damageMultiplier - 0.2f;
}
}
|