Damage modifier support for vanilla entities (throwables, shulker bullet and fangs)

This commit is contained in:
Electroblob77
2020-06-30 15:11:27 +01:00
parent 6a8951ab39
commit 148f527504
3 changed files with 51 additions and 2 deletions
@@ -88,7 +88,9 @@ public class Fangs extends Spell {
Integer y = BlockUtils.getNearestFloor(world, new BlockPos(vec), 5);
if(y != null){
world.spawnEntity(new EntityEvokerFangs(world, vec.x, y, vec.z, yaw, i, caster)); // null is fine here
EntityEvokerFangs fangs = new EntityEvokerFangs(world, vec.x, y, vec.z, yaw, i, caster); // null is fine here
fangs.getEntityData().setFloat(SpellThrowable.DAMAGE_MODIFIER_NBT_KEY, modifiers.get(SpellModifiers.POTENCY));
world.spawnEntity(fangs);
flag = true;
}
}