Initial 1.11.2 update
This commit is contained in:
@@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class SummonSpiritWolf extends Spell {
|
||||
|
||||
public SummonSpiritWolf() {
|
||||
public SummonSpiritWolf(){
|
||||
super(Tier.APPRENTICE, 25, Element.EARTH, "summon_spirit_wolf", SpellType.MINION, 100, EnumAction.BOW, false);
|
||||
}
|
||||
|
||||
@@ -26,24 +26,25 @@ public class SummonSpiritWolf 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){
|
||||
|
||||
WizardData properties = WizardData.get(caster);
|
||||
|
||||
|
||||
if(!properties.hasSpiritWolf){
|
||||
if(!world.isRemote){
|
||||
|
||||
BlockPos pos = WizardryUtilities.findNearbyFloorSpace(caster, 2, 4);
|
||||
if(pos == null) return false;
|
||||
|
||||
|
||||
EntitySpiritWolf wolf = new EntitySpiritWolf(world);
|
||||
wolf.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5);
|
||||
wolf.setTamed(true);
|
||||
wolf.setOwnerId(caster.getUniqueID());
|
||||
world.spawnEntityInWorld(wolf);
|
||||
world.spawnEntity(wolf);
|
||||
}
|
||||
properties.hasSpiritWolf = true;
|
||||
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_HEAL, 0.7F, world.rand.nextFloat() * 0.4F + 1.0F);
|
||||
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_HEAL, 0.7F,
|
||||
world.rand.nextFloat() * 0.4F + 1.0F);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user