Initial 1.11.2 update
This commit is contained in:
@@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class Thunderbolt extends Spell {
|
||||
|
||||
public Thunderbolt() {
|
||||
public Thunderbolt(){
|
||||
super(Tier.BASIC, 10, Element.LIGHTNING, "thunderbolt", SpellType.ATTACK, 15, EnumAction.NONE, false);
|
||||
}
|
||||
|
||||
@@ -26,37 +26,40 @@ public class Thunderbolt extends Spell {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cast(World world, EntityPlayer caster, EnumHand hand, int ticksInUse, SpellModifiers modifiers) {
|
||||
public boolean cast(World world, EntityPlayer caster, EnumHand hand, int ticksInUse, SpellModifiers modifiers){
|
||||
|
||||
if(!world.isRemote){
|
||||
EntityThunderbolt thunderbolt = new EntityThunderbolt(world, caster, modifiers.get(SpellModifiers.DAMAGE));
|
||||
world.spawnEntityInWorld(thunderbolt);
|
||||
world.spawnEntity(thunderbolt);
|
||||
}
|
||||
|
||||
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_ICE, 0.8F, world.rand.nextFloat() * 0.2F + 0.8F);
|
||||
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_ICE, 0.8F,
|
||||
world.rand.nextFloat() * 0.2F + 0.8F);
|
||||
caster.swingArm(hand);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cast(World world, EntityLiving caster, EnumHand hand, int ticksInUse, EntityLivingBase target, SpellModifiers modifiers){
|
||||
|
||||
public boolean cast(World world, EntityLiving caster, EnumHand hand, int ticksInUse, EntityLivingBase target,
|
||||
SpellModifiers modifiers){
|
||||
|
||||
if(target != null){
|
||||
|
||||
|
||||
if(!world.isRemote){
|
||||
EntityThunderbolt thunderbolt = new EntityThunderbolt(world, caster, modifiers.get(SpellModifiers.DAMAGE));
|
||||
EntityThunderbolt thunderbolt = new EntityThunderbolt(world, caster,
|
||||
modifiers.get(SpellModifiers.DAMAGE));
|
||||
thunderbolt.directTowards(target, 2.5f);
|
||||
world.spawnEntityInWorld(thunderbolt);
|
||||
world.spawnEntity(thunderbolt);
|
||||
}
|
||||
|
||||
caster.playSound(WizardrySounds.SPELL_ICE, 0.8F, world.rand.nextFloat() * 0.2F + 0.8F);
|
||||
caster.swingArm(hand);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canBeCastByNPCs(){
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user