Anti-comments sweep!

This commit is contained in:
Tombenpotter 2014-10-13 22:33:20 +02:00
parent e6a10f3f06
commit dea1f87078
454 changed files with 23594 additions and 26739 deletions

View file

@ -1,27 +1,25 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class RitualEffectJumping extends RitualEffect
{
public static final int aetherDrain = 10;
public static final int terraeDrain = 10;
public static final int aetherDrain = 10;
public static final int terraeDrain = 10;
@Override
public void performEffect(IMasterRitualStone ritualStone)
{
@ -32,9 +30,9 @@ public class RitualEffectJumping extends RitualEffect
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
double range = 0.5;
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x+0.5, y+1.5, z+0.5, range, range);
double range = 0.5;
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range);
if (currentEssence < this.getCostPerRefresh() * livingList.size())
{
@ -42,25 +40,25 @@ public class RitualEffectJumping extends RitualEffect
} else
{
int flag = 0;
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
for(EntityLivingBase livingEntity : livingList)
for (EntityLivingBase livingEntity : livingList)
{
if(livingEntity.isSneaking())
{
continue;
}
hasAether = hasAether && this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
hasTerrae = hasTerrae && this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
if (livingEntity.isSneaking())
{
continue;
}
hasAether = hasAether && this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
hasTerrae = hasTerrae && this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
double motionY = 1.5 * (hasAether ? 2 : 1);
if (livingEntity instanceof EntityPlayer)
{
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)livingEntity, livingEntity.motionX, motionY, livingEntity.motionZ);
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, livingEntity.motionX, motionY, livingEntity.motionZ);
livingEntity.motionY = motionY;
livingEntity.fallDistance = 0;
flag++;
@ -70,24 +68,24 @@ public class RitualEffectJumping extends RitualEffect
livingEntity.fallDistance = 0;
flag++;
}
if(hasAether)
if (hasAether)
{
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
}
if(hasTerrae)
if (hasTerrae)
{
if(!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall))
{
livingEntity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 5 * 20, 0));
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
}
if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall))
{
livingEntity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 5 * 20, 0));
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
}
}
}
if (flag > 0)
{
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()*flag);
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag);
}
}
}
@ -99,9 +97,9 @@ public class RitualEffectJumping extends RitualEffect
}
@Override
public List<RitualComponent> getRitualComponentList()
{
ArrayList<RitualComponent> jumpingRitual = new ArrayList();
public List<RitualComponent> getRitualComponentList()
{
ArrayList<RitualComponent> jumpingRitual = new ArrayList();
for (int i = -1; i <= 1; i++)
{
@ -111,5 +109,5 @@ public class RitualEffectJumping extends RitualEffect
jumpingRitual.add(new RitualComponent(1, i, -1, RitualComponent.AIR));
}
return jumpingRitual;
}
}
}