mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 12:59:44 +00:00
Automatic cleanup of formatting
This commit is contained in:
1 parent
f4e9c61e3a
commit
d30b2482df
6 files changed
+74
-77
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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<ItemStack> collect() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Collection<ItemStack> collect() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ICrop> harvest(int x, int y, int z, ForgeDirection direction, int extent) {
|
||||
World world = getWorld();
|
||||
@Override
|
||||
public Collection<ICrop> harvest(int x, int y, int z, ForgeDirection direction, int extent) {
|
||||
World world = getWorld();
|
||||
|
||||
Stack<ICrop> crops = new Stack<ICrop>();
|
||||
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<ICrop> crops = new Stack<ICrop>();
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user