From d30b2482df1614c3929b280a7defb5b526f9d231 Mon Sep 17 00:00:00 2001 From: mezz Date: Mon, 2 Mar 2015 22:51:16 -0800 Subject: [PATCH] Automatic cleanup of formatting --- .../forestry/apiculture/genetics/Bee.java | 1 - .../farming/logic/CropBasicFruit.java | 9 +- .../farming/logic/FarmLogicEnder.java | 134 +++++++++--------- .../farming/logic/FarmLogicOrchard.java | 2 +- .../java/forestry/plugins/PluginCore.java | 2 +- .../forestry/plugins/PluginHarvestCraft.java | 3 - 6 files changed, 74 insertions(+), 77 deletions(-) diff --git a/src/main/java/forestry/apiculture/genetics/Bee.java b/src/main/java/forestry/apiculture/genetics/Bee.java index 47abb0e18..b66661701 100755 --- a/src/main/java/forestry/apiculture/genetics/Bee.java +++ b/src/main/java/forestry/apiculture/genetics/Bee.java @@ -37,7 +37,6 @@ import forestry.api.core.BiomeHelper; import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.EnumTolerance; import forestry.api.genetics.IAllele; import forestry.api.genetics.IAlleleTolerance; import forestry.api.genetics.IChromosome; diff --git a/src/main/java/forestry/farming/logic/CropBasicFruit.java b/src/main/java/forestry/farming/logic/CropBasicFruit.java index eaca0a5d8..f46a872ea 100644 --- a/src/main/java/forestry/farming/logic/CropBasicFruit.java +++ b/src/main/java/forestry/farming/logic/CropBasicFruit.java @@ -10,14 +10,15 @@ ******************************************************************************/ package forestry.farming.logic; -import forestry.core.config.Defaults; -import forestry.core.proxy.Proxies; -import forestry.core.vect.Vect; +import java.util.Collection; + import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.Collection; +import forestry.core.config.Defaults; +import forestry.core.proxy.Proxies; +import forestry.core.vect.Vect; public class CropBasicFruit extends Crop { diff --git a/src/main/java/forestry/farming/logic/FarmLogicEnder.java b/src/main/java/forestry/farming/logic/FarmLogicEnder.java index d773d1272..2e1e14e2f 100644 --- a/src/main/java/forestry/farming/logic/FarmLogicEnder.java +++ b/src/main/java/forestry/farming/logic/FarmLogicEnder.java @@ -34,90 +34,90 @@ import forestry.core.vect.VectUtil; public class FarmLogicEnder extends FarmLogicHomogeneous { - public FarmLogicEnder(IFarmHousing housing) { - super(housing, - new ItemStack[]{new ItemStack(Blocks.end_stone)}, - new ItemStack(Blocks.end_stone), - Farmables.farmables.get("farmEnder").toArray(new IFarmable[0])); + public FarmLogicEnder(IFarmHousing housing) { + super(housing, + new ItemStack[]{new ItemStack(Blocks.end_stone)}, + new ItemStack(Blocks.end_stone), + Farmables.farmables.get("farmEnder").toArray(new IFarmable[0])); - } + } - @Override - public String getName() { - return "Managed Ender Farm"; - } + @Override + public String getName() { + return "Managed Ender Farm"; + } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon() { - return Items.ender_eye.getIconFromDamage(0); - } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon() { + return Items.ender_eye.getIconFromDamage(0); + } - @Override - public int getFertilizerConsumption() { - return 20; - } + @Override + public int getFertilizerConsumption() { + return 20; + } - @Override - public int getWaterConsumption(float hydrationModifier) { - return 0; - } + @Override + public int getWaterConsumption(float hydrationModifier) { + return 0; + } - @Override - public Collection collect() { - return null; - } + @Override + public Collection collect() { + return null; + } - @Override - public Collection harvest(int x, int y, int z, ForgeDirection direction, int extent) { - World world = getWorld(); + @Override + public Collection harvest(int x, int y, int z, ForgeDirection direction, int extent) { + World world = getWorld(); - Stack crops = new Stack(); - for (int i = 0; i < extent; i++) { - Vect position = translateWithOffset(x, y + 1, z, direction, i); - for (IFarmable farmable : germlings) { - ICrop crop = farmable.getCropAt(world, position.x, position.y, position.z); - if (crop != null) { - crops.push(crop); - } - } + Stack crops = new Stack(); + for (int i = 0; i < extent; i++) { + Vect position = translateWithOffset(x, y + 1, z, direction, i); + for (IFarmable farmable : germlings) { + ICrop crop = farmable.getCropAt(world, position.x, position.y, position.z); + if (crop != null) { + crops.push(crop); + } + } - } - return crops; + } + return crops; - } + } - @Override - protected boolean maintainGermlings(int x, int y, int z, ForgeDirection direction, int extent) { - World world = getWorld(); + @Override + protected boolean maintainGermlings(int x, int y, int z, ForgeDirection direction, int extent) { + World world = getWorld(); - for (int i = 0; i < extent; i++) { - Vect position = translateWithOffset(x, y, z, direction, i); - if (!VectUtil.isAirBlock(world, position) && !Utils.isReplaceableBlock(world, position.x, position.y, position.z)) { - continue; - } + for (int i = 0; i < extent; i++) { + Vect position = translateWithOffset(x, y, z, direction, i); + if (!VectUtil.isAirBlock(world, position) && !Utils.isReplaceableBlock(world, position.x, position.y, position.z)) { + continue; + } - ItemStack below = VectUtil.getAsItemStack(world, position.add(0, -1, 0)); - if (!isAcceptedSoil(below)) { - continue; - } + ItemStack below = VectUtil.getAsItemStack(world, position.add(0, -1, 0)); + if (!isAcceptedSoil(below)) { + continue; + } - return trySetCrop(position); - } + return trySetCrop(position); + } - return false; - } + return false; + } - private boolean trySetCrop(Vect position) { - World world = getWorld(); + private boolean trySetCrop(Vect position) { + World world = getWorld(); - for (IFarmable candidate : germlings) { - if (housing.plantGermling(candidate, world, position.x, position.y, position.z)) { - return true; - } - } + for (IFarmable candidate : germlings) { + if (housing.plantGermling(candidate, world, position.x, position.y, position.z)) { + return true; + } + } - return false; - } + return false; + } } diff --git a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java index 226d43a6c..76e03a90f 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java +++ b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java @@ -161,7 +161,7 @@ public class FarmLogicOrchard extends FarmLogic { if (VectUtil.isWoodBlock(world, candidate)) { candidates.add(candidate); seen.add(candidate); - } else if (isFruitBearer(world, candidate)){ + } else if (isFruitBearer(world, candidate)) { candidates.add(candidate); seen.add(candidate); diff --git a/src/main/java/forestry/plugins/PluginCore.java b/src/main/java/forestry/plugins/PluginCore.java index 2f440c7ab..ae6a25e63 100644 --- a/src/main/java/forestry/plugins/PluginCore.java +++ b/src/main/java/forestry/plugins/PluginCore.java @@ -60,6 +60,7 @@ import forestry.core.interfaces.IPickupHandler; import forestry.core.interfaces.ISaveEventHandler; import forestry.core.items.ItemArmorNaturalist; import forestry.core.items.ItemAssemblyKit; +import forestry.core.items.ItemElectronTube; import forestry.core.items.ItemForestry; import forestry.core.items.ItemForestryBlock; import forestry.core.items.ItemForestryPickaxe; @@ -68,7 +69,6 @@ import forestry.core.items.ItemFruit; import forestry.core.items.ItemMisc; import forestry.core.items.ItemOverlay.OverlayInfo; import forestry.core.items.ItemPipette; -import forestry.core.items.ItemElectronTube; import forestry.core.items.ItemTypedBlock; import forestry.core.items.ItemWrench; import forestry.core.proxy.Proxies; diff --git a/src/main/java/forestry/plugins/PluginHarvestCraft.java b/src/main/java/forestry/plugins/PluginHarvestCraft.java index afbb4a1d6..120768462 100644 --- a/src/main/java/forestry/plugins/PluginHarvestCraft.java +++ b/src/main/java/forestry/plugins/PluginHarvestCraft.java @@ -12,9 +12,6 @@ package forestry.plugins; import com.google.common.collect.ImmutableList; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack;