From 0880c0c499b7a34fee978d9c22c35562e37ebb3d Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Wed, 10 Sep 2014 15:25:05 +0800 Subject: [PATCH] #959 Config option to disable tinker's XP bushes in farming station --- src/main/java/crazypants/enderio/config/Config.java | 13 +++++++++---- .../machine/farm/farmers/NaturaBerryFarmer.java | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/crazypants/enderio/config/Config.java b/src/main/java/crazypants/enderio/config/Config.java index 47cbe4b1..499bf155 100644 --- a/src/main/java/crazypants/enderio/config/Config.java +++ b/src/main/java/crazypants/enderio/config/Config.java @@ -63,9 +63,9 @@ public final class Config { public static boolean reinforcedObsidianEnabled = true; - public static boolean useAlternateBinderRecipe; + public static boolean useAlternateBinderRecipe = false; - public static boolean useAlternateTesseractModel; + public static boolean useAlternateTesseractModel = false; public static boolean photovoltaicCellEnabled = true; @@ -109,7 +109,7 @@ public final class Config { public static boolean travelAnchorEnabled = true; public static int travelAnchorMaxDistance = 48; - public static int travelStaffMaxDistance = 96; + public static int travelStaffMaxDistance = 128; public static float travelStaffPowerPerBlockRF = 250; public static int travelStaffMaxBlinkDistance = 16; @@ -215,6 +215,8 @@ public final class Config { public static boolean farmAxeDamageOnLeafBreak = false; public static float farmToolTakeDamageChance = 1; public static boolean disableFarmNotification = false; + public static boolean farmEssenceBerriesEnabled = true; + public static int magnetPowerUsePerSecondRF = 1; public static int magnetPowerCapacityRF = 100000; @@ -273,7 +275,7 @@ public final class Config { public static int soulBinderReanimationRF = 100000; public static int soulBinderEnderCystalRF = 100000; - public static boolean powerConduitCanDifferentTiersConnect = true; + public static boolean powerConduitCanDifferentTiersConnect = false; public static int powerConduitTierOneRF = 640; public static int powerConduitTierTwoRF = 5120; public static int powerConduitTierThreeRF = 20480; @@ -680,6 +682,9 @@ public final class Config { disableFarmNotification = config.get(sectionFarm.name, "disableFarmNotifications", disableFarmNotification, "Disable the notification text above the farm block.").getBoolean(); + + farmEssenceBerriesEnabled = config.get(sectionFarm.name, "farmEssenceBerriesEnabled", farmEssenceBerriesEnabled, + "This setting controls wether essence berry bushes from TiC can be harvested by the farm.").getBoolean(); combustionGeneratorUseOpaqueModel = config.get(sectionAesthetic.name, "combustionGeneratorUseOpaqueModel", combustionGeneratorUseOpaqueModel, "If set to true: fluid will not be shown in combustion generator tanks. Improves FPS. ").getBoolean(combustionGeneratorUseOpaqueModel); diff --git a/src/main/java/crazypants/enderio/machine/farm/farmers/NaturaBerryFarmer.java b/src/main/java/crazypants/enderio/machine/farm/farmers/NaturaBerryFarmer.java index f1a3f977..444ab7e8 100644 --- a/src/main/java/crazypants/enderio/machine/farm/farmers/NaturaBerryFarmer.java +++ b/src/main/java/crazypants/enderio/machine/farm/farmers/NaturaBerryFarmer.java @@ -6,6 +6,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; +import crazypants.enderio.config.Config; import crazypants.enderio.machine.farm.TileFarmStation; import crazypants.util.BlockCoord; @@ -54,6 +55,10 @@ public class NaturaBerryFarmer extends PickableFarmer { @Override public boolean canHarvest(TileFarmStation farm, BlockCoord bc, Block block, int meta) { + if(!Config.farmEssenceBerriesEnabled && "tile.ore.berries.two".equals(block.getUnlocalizedName()) && meta == grownBlockMeta) { + return false; + } + BlockCoord checkBlock = bc; for(int i=0; i < 5; i++) {