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
@@ -14,34 +14,33 @@ import net.minecraft.world.World;
public class Leap extends Spell {
public Leap() {
public Leap(){
super(Tier.BASIC, 10, Element.EARTH, "leap", SpellType.UTILITY, 20, EnumAction.NONE, false);
}
@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(caster.onGround){
caster.motionY = 0.65 * modifiers.get(SpellModifiers.DAMAGE);
caster.addVelocity(caster.getLookVec().xCoord*0.3, 0, caster.getLookVec().zCoord*0.3);
caster.addVelocity(caster.getLookVec().xCoord * 0.3, 0, caster.getLookVec().zCoord * 0.3);
if(world.isRemote){
for(int i=0; i<10; i++){
for(int i = 0; i < 10; i++){
double x = (double)(caster.posX + world.rand.nextFloat() - 0.5F);
double y = (double)(caster.getEntityBoundingBox().minY);
double z = (double)(caster.posZ + world.rand.nextFloat() - 0.5F);
world.spawnParticle(EnumParticleTypes.CLOUD, x, y, z, 0, 0, 0);
}
}
WizardryUtilities.playSoundAtPlayer(caster, SoundEvents.ENTITY_ENDERDRAGON_FLAP, 0.5F, 1.0f);
caster.swingArm(hand);
return true;
}
return false;
}
}