Apply lightning bolt changes to thunderstorm

This commit is contained in:
Electroblob77
2020-06-30 15:12:37 +01:00
parent 323b1e1799
commit 4e0b63f06b
@@ -68,14 +68,12 @@ public class Thunderstorm extends Spell {
if(y != null){ if(y != null){
if(!world.isRemote){ if(!world.isRemote){
EntityLightningBolt entitylightning = new EntityLightningBolt(world, x, y, z, false); EntityLightningBolt lightning = new EntityLightningBolt(world, x, y, z, false);
world.addWeatherEffect(entitylightning); lightning.getEntityData().setUniqueId(LightningBolt.SUMMONER_NBT_KEY, caster.getUniqueID());
lightning.getEntityData().setFloat(LightningBolt.DAMAGE_MODIFIER_NBT_KEY, modifiers.get(SpellModifiers.POTENCY));
world.addWeatherEffect(lightning);
} }
// Code for eventhandler recognition; for achievements and such like. Left in for future use.
// NBTTagCompound entityNBT = entitylightning.getEntityData();
// entityNBT.setInteger("summoningPlayer", entityplayer.entityId);
// Secondary chaining effect // Secondary chaining effect
List<EntityLivingBase> secondaryTargets = EntityUtils.getLivingWithinRadius( List<EntityLivingBase> secondaryTargets = EntityUtils.getLivingWithinRadius(
getProperty(SECONDARY_RANGE).doubleValue(), x, y + 1, z, world); getProperty(SECONDARY_RANGE).doubleValue(), x, y + 1, z, world);