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
@@ -20,16 +20,17 @@ import net.minecraft.world.World;
public class GroupHeal extends Spell {
public GroupHeal() {
public GroupHeal(){
super(Tier.ADVANCED, 35, Element.HEALING, "group_heal", SpellType.DEFENCE, 150, EnumAction.BOW, 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){
boolean flag = false;
List<EntityLivingBase> targets = WizardryUtilities.getEntitiesWithinRadius(5*modifiers.get(WizardryItems.blast_upgrade), caster.posX, caster.posY, caster.posZ, world);
List<EntityLivingBase> targets = WizardryUtilities.getEntitiesWithinRadius(
5 * modifiers.get(WizardryItems.blast_upgrade), caster.posX, caster.posY, caster.posZ, world);
for(EntityLivingBase target : targets){
@@ -39,43 +40,50 @@ public class GroupHeal extends Spell {
if(((EntityPlayer)target).shouldHeal()){
target.heal((int)(6*modifiers.get(SpellModifiers.DAMAGE)));
target.heal((int)(6 * modifiers.get(SpellModifiers.DAMAGE)));
if(world.isRemote){
for(int i=0; i<10; i++){
double d0 = (double)((float)target.posX + world.rand.nextFloat()*2 - 1.0F);
double d1 = (double)((float)WizardryUtilities.getPlayerEyesPos((EntityPlayer)target) - 0.5F + world.rand.nextFloat());
double d2 = (double)((float)target.posZ + world.rand.nextFloat()*2 - 1.0F);
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, d0, d1, d2, 0, 0.1F, 0, 48 + world.rand.nextInt(12), 1.0f, 1.0f, 0.3f);
for(int i = 0; i < 10; i++){
double d0 = (double)((float)target.posX + world.rand.nextFloat() * 2 - 1.0F);
double d1 = (double)((float)WizardryUtilities.getPlayerEyesPos((EntityPlayer)target)
- 0.5F + world.rand.nextFloat());
double d2 = (double)((float)target.posZ + world.rand.nextFloat() * 2 - 1.0F);
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, d0, d1, d2, 0, 0.1F,
0, 48 + world.rand.nextInt(12), 1.0f, 1.0f, 0.3f);
}
}
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);
flag = true;
}
}
// Now also works on summoned creatures
// Now also works on summoned creatures
}else if(target instanceof ISummonedCreature){
EntityLivingBase summoner = ((ISummonedCreature)target).getCaster();
if(summoner == caster || (summoner instanceof EntityPlayer && WizardryUtilities.isPlayerAlly(caster, (EntityPlayer)summoner))){
if(summoner == caster || (summoner instanceof EntityPlayer
&& WizardryUtilities.isPlayerAlly(caster, (EntityPlayer)summoner))){
if(target.getHealth() < target.getMaxHealth()){
target.heal((int)(6*modifiers.get(SpellModifiers.DAMAGE)));
target.heal((int)(6 * modifiers.get(SpellModifiers.DAMAGE)));
if(world.isRemote){
for(int i=0; i<10; i++){
double d0 = (double)((float)target.posX + world.rand.nextFloat()*2 - 1.0F);
double d1 = (double)((float)WizardryUtilities.getPlayerEyesPos((EntityPlayer)target) - 0.5F + world.rand.nextFloat());
double d2 = (double)((float)target.posZ + world.rand.nextFloat()*2 - 1.0F);
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, d0, d1, d2, 0, 0.1F, 0, 48 + world.rand.nextInt(12), 1.0f, 1.0f, 0.3f);
for(int i = 0; i < 10; i++){
double d0 = (double)((float)target.posX + world.rand.nextFloat() * 2 - 1.0F);
double d1 = (double)((float)WizardryUtilities.getPlayerEyesPos((EntityPlayer)target)
- 0.5F + world.rand.nextFloat());
double d2 = (double)((float)target.posZ + world.rand.nextFloat() * 2 - 1.0F);
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, d0, d1, d2, 0, 0.1F,
0, 48 + world.rand.nextInt(12), 1.0f, 1.0f, 0.3f);
}
}
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);
flag = true;
}
}
@@ -85,5 +93,4 @@ public class GroupHeal extends Spell {
return flag;
}
}