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
@@ -18,44 +18,46 @@ import net.minecraft.world.World;
public class Earthquake extends Spell {
public Earthquake() {
public Earthquake(){
super(Tier.MASTER, 75, Element.EARTH, "earthquake", SpellType.ATTACK, 250, 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){
if(!world.isRemote){
world.spawnEntityInWorld(new EntityEarthquake(world, caster.posX, caster.getEntityBoundingBox().minY, caster.posZ,
caster, (int)(20*modifiers.get(WizardryItems.blast_upgrade)), modifiers.get(SpellModifiers.DAMAGE)));
world.spawnEntity(new EntityEarthquake(world, caster.posX, caster.getEntityBoundingBox().minY,
caster.posZ, caster, (int)(20 * modifiers.get(WizardryItems.blast_upgrade)),
modifiers.get(SpellModifiers.DAMAGE)));
}else{
world.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, caster.posX, caster.getEntityBoundingBox().minY + 0.1, caster.posZ, 0, 0, 0);
world.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, caster.posX,
caster.getEntityBoundingBox().minY + 0.1, caster.posZ, 0, 0, 0);
double particleX, particleZ;
for(int i=0;i<40;i++){
particleX = caster.posX - 1.0d + 2*world.rand.nextDouble();
particleZ = caster.posZ - 1.0d + 2*world.rand.nextDouble();
for(int i = 0; i < 40; i++){
particleX = caster.posX - 1.0d + 2 * world.rand.nextDouble();
particleZ = caster.posZ - 1.0d + 2 * world.rand.nextDouble();
IBlockState block = WizardryUtilities.getBlockEntityIsStandingOn(caster);
if(block != null){
world.spawnParticle(EnumParticleTypes.BLOCK_DUST, particleX, caster.getEntityBoundingBox().minY,
particleZ, particleX - caster.posX, 0, particleZ - caster.posZ, Block.getStateId(block));
particleZ, particleX - caster.posX, 0, particleZ - caster.posZ,
Block.getStateId(block));
}
}
}
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_EARTHQUAKE, 2, 1);
caster.swingArm(hand);
return true;
}
return false;
}
}