That's one heck of a commit you've got there...

I may have got a bit behind with version control. A lot behind, in fact. Maybe I'll go back and split this sometime - then again, I probably won't. But hey, at least it's here!
This commit is contained in:
Electroblob77
2019-08-18 00:04:18 +01:00
parent 2680d02304
commit f37812be3e
1564 changed files with 47652 additions and 12984 deletions
@@ -1,12 +1,7 @@
package electroblob.wizardry.spell;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.constants.SpellType;
import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.util.SpellModifiers;
import electroblob.wizardry.util.WizardryUtilities;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.EnumAction;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
@@ -14,8 +9,13 @@ import net.minecraft.world.World;
public class Leap extends Spell {
public static final String HORIZONTAL_SPEED = "horizontal_speed";
public static final String VERTICAL_SPEED = "vertical_speed";
public Leap(){
super("leap", Tier.BASIC, Element.EARTH, SpellType.UTILITY, 10, 20, EnumAction.NONE, false);
super("leap", EnumAction.NONE, false);
addProperties(HORIZONTAL_SPEED, VERTICAL_SPEED);
soundValues(0.5f, 1, 0);
}
@Override
@@ -23,19 +23,20 @@ public class Leap extends Spell {
if(caster.onGround){
caster.motionY = 0.65 * modifiers.get(SpellModifiers.POTENCY);
caster.addVelocity(caster.getLookVec().x * 0.3, 0, caster.getLookVec().z * 0.3);
caster.motionY = getProperty(VERTICAL_SPEED).floatValue() * modifiers.get(SpellModifiers.POTENCY);
double horizontalSpeed = getProperty(HORIZONTAL_SPEED).floatValue();
caster.addVelocity(caster.getLookVec().x * horizontalSpeed, 0, caster.getLookVec().z * horizontalSpeed);
if(world.isRemote){
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);
double x = caster.posX + world.rand.nextFloat() - 0.5F;
double y = caster.getEntityBoundingBox().minY;
double z = 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);
this.playSound(world, caster, ticksInUse, -1, modifiers);
caster.swingArm(hand);
return true;
}