Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -16,7 +16,7 @@ import net.minecraft.world.World;
public class SummonSpiritHorse extends Spell {
public SummonSpiritHorse() {
public SummonSpiritHorse(){
super(Tier.ADVANCED, 50, Element.EARTH, "summon_spirit_horse", SpellType.MINION, 150, EnumAction.BOW, false);
}
@@ -26,28 +26,28 @@ public class SummonSpiritHorse 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.hasSpiritHorse){
if(!world.isRemote){
BlockPos pos = WizardryUtilities.findNearbyFloorSpace(caster, 2, 4);
if(pos == null) return false;
EntitySpiritHorse horse = new EntitySpiritHorse(world);
horse.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5);
horse.setTamedBy(caster);
horse.setHorseSaddled(true);
world.spawnEntityInWorld(horse);
world.spawnEntity(horse);
}
properties.hasSpiritHorse = 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;
}
}