From 4e0b63f06b0c41cdb5f688c40507ef9c23254db5 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Tue, 30 Jun 2020 15:12:37 +0100 Subject: [PATCH] Apply lightning bolt changes to thunderstorm --- .../java/electroblob/wizardry/spell/Thunderstorm.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/electroblob/wizardry/spell/Thunderstorm.java b/src/main/java/electroblob/wizardry/spell/Thunderstorm.java index b48d3a25..732cbbe0 100644 --- a/src/main/java/electroblob/wizardry/spell/Thunderstorm.java +++ b/src/main/java/electroblob/wizardry/spell/Thunderstorm.java @@ -68,14 +68,12 @@ public class Thunderstorm extends Spell { if(y != null){ if(!world.isRemote){ - EntityLightningBolt entitylightning = new EntityLightningBolt(world, x, y, z, false); - world.addWeatherEffect(entitylightning); + EntityLightningBolt lightning = new EntityLightningBolt(world, x, y, z, false); + 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 List secondaryTargets = EntityUtils.getLivingWithinRadius( getProperty(SECONDARY_RANGE).doubleValue(), x, y + 1, z, world);