Run formatter

This commit is contained in:
Nicholas Ignoffo 2017-08-15 21:30:48 -07:00
parent 61c44a831b
commit 08258fd6ef
606 changed files with 13464 additions and 22975 deletions

View file

@ -1,7 +1,5 @@
package WayofTime.bloodmagic.item.sigil;
import java.util.List;
import WayofTime.bloodmagic.api.BloodMagicAPI;
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
import net.minecraft.entity.player.EntityPlayer;
@ -12,37 +10,32 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class ItemSigilFastMiner extends ItemSigilToggleableBase
{
public ItemSigilFastMiner()
{
import java.util.List;
public class ItemSigilFastMiner extends ItemSigilToggleableBase {
public ItemSigilFastMiner() {
super("fastMiner", 100);
}
@Override
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
{
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) {
if (PlayerHelper.isFakePlayer(player))
return;
player.addPotionEffect(new PotionEffect(MobEffects.HASTE, 2, 0, true, false));
}
@Override
public boolean performArrayEffect(World world, BlockPos pos)
{
public boolean performArrayEffect(World world, BlockPos pos) {
double radius = 10;
int ticks = 600;
int potionPotency = 2;
AxisAlignedBB bb = new AxisAlignedBB(pos).grow(radius);
List<EntityPlayer> playerList = world.getEntitiesWithinAABB(EntityPlayer.class, bb);
for (EntityPlayer player : playerList)
{
if (!player.isPotionActive(MobEffects.HASTE) || (player.isPotionActive(MobEffects.HASTE) && player.getActivePotionEffect(MobEffects.HASTE).getAmplifier() < potionPotency))
{
for (EntityPlayer player : playerList) {
if (!player.isPotionActive(MobEffects.HASTE) || (player.isPotionActive(MobEffects.HASTE) && player.getActivePotionEffect(MobEffects.HASTE).getAmplifier() < potionPotency)) {
player.addPotionEffect(new PotionEffect(MobEffects.HASTE, ticks, potionPotency));
if (!player.capabilities.isCreativeMode)
{
if (!player.capabilities.isCreativeMode) {
player.hurtResistantTime = 0;
player.attackEntityFrom(BloodMagicAPI.damageSource, 1.0F);
}
@ -53,8 +46,7 @@ public class ItemSigilFastMiner extends ItemSigilToggleableBase
}
@Override
public boolean hasArrayEffect()
{
public boolean hasArrayEffect() {
return true;
}
}