From 9f2f2ed85bbf2615a6f65046326159d2fcfd70d6 Mon Sep 17 00:00:00 2001 From: mezz Date: Fri, 15 Jan 2016 20:07:54 -0800 Subject: [PATCH 01/21] Fix #1043 Crash from mods spawning wood items with wildcard metadata --- .../java/forestry/arboriculture/items/ItemBlockWood.java | 2 +- .../forestry/arboriculture/render/IconProviderWood.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java index b798f562f..57ad32bd2 100644 --- a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java +++ b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java @@ -121,7 +121,7 @@ public class ItemBlockWood extends ItemBlockForestry { if (ordinal >= 0 && ordinal < EnumWoodType.VALUES.length) { return EnumWoodType.VALUES[ordinal]; } - return null; + return EnumWoodType.LARCH; } @Override diff --git a/src/main/java/forestry/arboriculture/render/IconProviderWood.java b/src/main/java/forestry/arboriculture/render/IconProviderWood.java index 8eb48ca85..fcbb91c4e 100644 --- a/src/main/java/forestry/arboriculture/render/IconProviderWood.java +++ b/src/main/java/forestry/arboriculture/render/IconProviderWood.java @@ -40,16 +40,25 @@ public abstract class IconProviderWood { @SideOnly(Side.CLIENT) public static IIcon getPlankIcon(EnumWoodType woodType) { + if (woodType == null) { + woodType = EnumWoodType.LARCH; + } return icons[0][woodType.ordinal()]; } @SideOnly(Side.CLIENT) public static IIcon getBarkIcon(EnumWoodType woodType) { + if (woodType == null) { + woodType = EnumWoodType.LARCH; + } return icons[1][woodType.ordinal()]; } @SideOnly(Side.CLIENT) public static IIcon getHeartIcon(EnumWoodType woodType) { + if (woodType == null) { + woodType = EnumWoodType.LARCH; + } return icons[2][woodType.ordinal()]; } From 32a9a6ff5c01b38404cf84019d18a07528972ead Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Sun, 24 Jan 2016 02:19:15 -0600 Subject: [PATCH 02/21] Fix #1051 Check for Farming module before adding BoP and Harvestcraft crops. --- .../plugins/compat/PluginBiomesOPlenty.java | 5 +++-- .../plugins/compat/PluginHarvestCraft.java | 21 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java index e0fc2b4bc..493bb45cf 100644 --- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java +++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java @@ -39,6 +39,7 @@ import forestry.farming.logic.FarmableGenericSapling; import forestry.plugins.ForestryPlugin; import forestry.plugins.Plugin; import forestry.plugins.PluginCore; +import forestry.plugins.PluginManager; @Plugin(pluginID = "BiomesOPlenty", name = "BiomesOPlenty", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.biomesoplenty.description") public class PluginBiomesOPlenty extends ForestryPlugin { @@ -99,14 +100,14 @@ public class PluginBiomesOPlenty extends ForestryPlugin { FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName)); } - if (saplings != null && persimmon != null) { + if (PluginManager.Module.FARMING.isEnabled() && saplings != null && persimmon != null) { Farmables.farmables.get("farmArboreal").add(new FarmableGenericSapling(saplings, 15, persimmon)); } Block boPTurnip = GameRegistry.findBlock(BoP, "turnip"); if (boPTurnip != null) { Item boPTurnipSeeds = GameRegistry.findItem(BoP, "turnipSeeds"); - if (boPTurnipSeeds != null) { + if (PluginManager.Module.FARMING.isEnabled() && boPTurnipSeeds != null) { Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(boPTurnipSeeds, 1, 0), boPTurnip, 7)); } diff --git a/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java b/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java index 5cf44a59a..4784c5c6e 100644 --- a/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java @@ -32,6 +32,7 @@ import forestry.farming.logic.FarmableGenericCrop; import forestry.plugins.ForestryPlugin; import forestry.plugins.Plugin; import forestry.plugins.PluginCore; +import forestry.plugins.PluginManager; @Plugin(pluginID = "HarvestCraft", name = "HarvestCraft", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.harvestcraft.description") public class PluginHarvestCraft extends ForestryPlugin { @@ -201,7 +202,7 @@ public class PluginHarvestCraft extends ForestryPlugin { if (berrySeed != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{berrySeed}, Fluids.SEEDOIL.getFluid(seedamount)); } - if (berrySeed != null && berryBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && berrySeed != null && berryBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(berrySeed, berryBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(berryBlock, 7)); } @@ -219,7 +220,7 @@ public class PluginHarvestCraft extends ForestryPlugin { if (fruitSeed != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{fruitSeed}, Fluids.SEEDOIL.getFluid(seedamount)); } - if (fruitSeed != null && fruitBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && fruitSeed != null && fruitBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(fruitSeed, fruitBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(fruitBlock, 7)); } @@ -238,7 +239,7 @@ public class PluginHarvestCraft extends ForestryPlugin { if (vegetableSeed != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{vegetableSeed}, Fluids.SEEDOIL.getFluid(seedamount)); } - if (vegetableSeed != null && vegetableBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && vegetableSeed != null && vegetableBlock != null) { Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(vegetableSeed, vegetableBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(vegetableBlock, 7)); } @@ -257,7 +258,7 @@ public class PluginHarvestCraft extends ForestryPlugin { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{grainSeed}, Fluids.SEEDOIL.getFluid(seedamount)); RecipeManagers.moistenerManager.addRecipe(grainSeed, new ItemStack(Blocks.mycelium), 5000); } - if (grainSeed != null && grainBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && grainSeed != null && grainBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(grainSeed, grainBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(grainBlock, 7)); } @@ -267,7 +268,7 @@ public class PluginHarvestCraft extends ForestryPlugin { for (String treeFruitName : treeFruits) { ItemStack treeFruit = GameRegistry.findItemStack(HC, treeFruitName + "Item", 1); Block treeFruitBlock = GameRegistry.findBlock(HC, "pam" + (Character.toUpperCase(treeFruitName.charAt(0)) + treeFruitName.substring(1))); - if (treeFruitBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && treeFruitBlock != null) { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(treeFruitBlock, 2)); } if (treeFruit != null) { @@ -278,7 +279,7 @@ public class PluginHarvestCraft extends ForestryPlugin { for (String treeName : trees) { Block fruitBlock = GameRegistry.findBlock(HC, "pam" + (Character.toUpperCase(treeName.charAt(0)) + treeName.substring(1))); - if (fruitBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && fruitBlock != null) { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(fruitBlock, 2)); } plants.add(treeName); @@ -286,7 +287,7 @@ public class PluginHarvestCraft extends ForestryPlugin { for (String treeName : treesSpecial) { Block fruitBlock = GameRegistry.findBlock(HC, "pam" + (Character.toUpperCase(treeName.charAt(0)) + treeName.substring(1))); - if (fruitBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && fruitBlock != null) { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(fruitBlock, 2)); } } @@ -297,7 +298,7 @@ public class PluginHarvestCraft extends ForestryPlugin { if (genericCropSeed != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{genericCropSeed}, Fluids.SEEDOIL.getFluid(seedamount)); } - if (genericCropSeed != null && genericCropBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && genericCropSeed != null && genericCropBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(genericCropSeed, genericCropBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(genericCropBlock, 7)); } @@ -309,7 +310,7 @@ public class PluginHarvestCraft extends ForestryPlugin { if (mustardCropSeed != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{mustardCropSeed}, Fluids.SEEDOIL.getFluid(seedamount)); } - if (mustardCropSeed != null && mustardCropBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && mustardCropSeed != null && mustardCropBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(mustardCropSeed, mustardCropBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(mustardCropBlock, 7)); } @@ -331,7 +332,7 @@ public class PluginHarvestCraft extends ForestryPlugin { if (cropnutSeed != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{cropnutSeed}, Fluids.SEEDOIL.getFluid(seedamount)); } - if (cropnutSeed != null && cropnutBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && cropnutSeed != null && cropnutBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(cropnutSeed, cropnutBlock, 7)); Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(cropnutBlock, 7)); } From a4d5117a979917b243999f78e73e49aefbc01f06 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Sun, 24 Jan 2016 03:05:27 -0600 Subject: [PATCH 03/21] Missed a check in BoP, also fix PlantMegaPack --- .../plugins/compat/PluginBiomesOPlenty.java | 4 +-- .../plugins/compat/PluginPlantMegaPack.java | 25 +++++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java index 493bb45cf..eaee10493 100644 --- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java +++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java @@ -105,9 +105,9 @@ public class PluginBiomesOPlenty extends ForestryPlugin { } Block boPTurnip = GameRegistry.findBlock(BoP, "turnip"); - if (boPTurnip != null) { + if (PluginManager.Module.FARMING.isEnabled() && boPTurnip != null) { Item boPTurnipSeeds = GameRegistry.findItem(BoP, "turnipSeeds"); - if (PluginManager.Module.FARMING.isEnabled() && boPTurnipSeeds != null) { + if (boPTurnipSeeds != null) { Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(boPTurnipSeeds, 1, 0), boPTurnip, 7)); } diff --git a/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java b/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java index ec6848656..5772a2d66 100644 --- a/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java +++ b/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java @@ -33,6 +33,7 @@ import forestry.farming.logic.FarmableGenericCrop; import forestry.farming.logic.FarmableStacked; import forestry.plugins.ForestryPlugin; import forestry.plugins.Plugin; +import forestry.plugins.PluginManager; @Plugin(pluginID = "PlantMegaPack", name = "PlantMegaPack", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.plantmegapack.description") public class PluginPlantMegaPack extends ForestryPlugin { @@ -365,7 +366,9 @@ public class PluginPlantMegaPack extends ForestryPlugin { ItemStack reedStack = GameRegistry.findItemStack(PlantMP, reedLike, 1); if (reedBlock != null && reedStack != null) { RecipeUtil.addFermenterRecipes(reedStack, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS); - Farmables.farmables.get("farmPoales").add(new FarmableStacked(reedBlock, 14, 4)); + if (PluginManager.Module.FARMING.isEnabled()) { + Farmables.farmables.get("farmPoales").add(new FarmableStacked(reedBlock, 14, 4)); + } } } @@ -380,8 +383,10 @@ public class PluginPlantMegaPack extends ForestryPlugin { if (seedStack != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{seedStack}, Fluids.SEEDOIL.getFluid(seedamount)); } - Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seedStack, landCropBlock, 4)); - Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(landCropBlock, 4)); + if (PluginManager.Module.FARMING.isEnabled()) { + Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seedStack, landCropBlock, 4)); + Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(landCropBlock, 4)); + } } } @@ -396,7 +401,7 @@ public class PluginPlantMegaPack extends ForestryPlugin { for (Map.Entry wPlant : floatingWaterPlant.entrySet()) { Block waterPlantBlock = GameRegistry.findBlock(PlantMP, wPlant.getKey()); - if (waterPlantBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && waterPlantBlock != null) { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(waterPlantBlock, wPlant.getValue())); } } @@ -412,8 +417,10 @@ public class PluginPlantMegaPack extends ForestryPlugin { if (foodStack != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{foodStack}, Fluids.JUICE.getFluid(juiceAmount)); } - Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(berryBushStack, berryBushCropBlock, berryBushCrop.getValue())); - Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(berryBushCropBlock, berryBushCrop.getValue())); + if (PluginManager.Module.FARMING.isEnabled()) { + Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(berryBushStack, berryBushCropBlock, berryBushCrop.getValue())); + Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(berryBushCropBlock, berryBushCrop.getValue())); + } } } @@ -428,7 +435,9 @@ public class PluginPlantMegaPack extends ForestryPlugin { if (plantBlock != null && plantBlock != null) { FlowerManager.flowerRegistry.registerAcceptableFlower(plantBlock, special.getValue()); FlowerManager.flowerRegistry.registerPlantableFlower(plantBlock, 0, 0.75, special.getValue()); - Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(specialStack, plantBlock, 4)); + if (PluginManager.Module.FARMING.isEnabled()) { + Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(specialStack, plantBlock, 4)); + } } } @@ -448,7 +457,7 @@ public class PluginPlantMegaPack extends ForestryPlugin { if (plantable && flowerBlock != null) { FlowerManager.flowerRegistry.registerPlantableFlower(flowerBlock, 0, 0.75, flowertype); } - if (flowerStack != null && flowerBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && flowerStack != null && flowerBlock != null) { Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(flowerStack, flowerBlock, flower.getValue())); if (flower.getValue() < 5) { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(flowerBlock, flower.getValue())); From 58fe331fe377e13789e7547a81139df4a0f8fb69 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Sun, 24 Jan 2016 03:17:37 -0600 Subject: [PATCH 04/21] And missed one in HC too. --- src/main/java/forestry/plugins/compat/PluginHarvestCraft.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java b/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java index 4784c5c6e..d018e88b8 100644 --- a/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java @@ -344,7 +344,7 @@ public class PluginHarvestCraft extends ForestryPlugin { for (String nutName : nuts) { ItemStack nut = GameRegistry.findItemStack(HC, nutName + "Item", 1); Block nutBlock = GameRegistry.findBlock(HC, "pam" + (Character.toUpperCase(nutName.charAt(0)) + nutName.substring(1))); - if (nutBlock != null) { + if (PluginManager.Module.FARMING.isEnabled() && nutBlock != null) { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(nutBlock, 2)); } if (nut != null) { From 2cdee676248e78d8d5dbba8289246ae3ee737b04 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Sun, 24 Jan 2016 03:35:55 -0600 Subject: [PATCH 05/21] Add Carrots equal to Apples in the squeezer(juice/mulch), potatoes at double fermenter rate of wheat (choice between pure fermenting, and seeds for seedoil) --- src/main/java/forestry/plugins/PluginFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/forestry/plugins/PluginFactory.java b/src/main/java/forestry/plugins/PluginFactory.java index 0a2ccb6c3..192caa403 100644 --- a/src/main/java/forestry/plugins/PluginFactory.java +++ b/src/main/java/forestry/plugins/PluginFactory.java @@ -273,6 +273,8 @@ public class PluginFactory extends ForestryPlugin { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.apple)}, Fluids.JUICE.getFluid(appleJuiceAmount), PluginCore.items.mulch.getItemStack(), appleMulchAmount); + RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.carrot)}, Fluids.JUICE.getFluid(appleJuiceAmount), + PluginCore.items.mulch.getItemStack(), appleMulchAmount); int seedOilAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed"); FluidStack seedOil = Fluids.SEEDOIL.getFluid(seedOilAmount); RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.wheat_seeds)}, seedOil); @@ -303,6 +305,7 @@ public class PluginFactory extends ForestryPlugin { RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.cactus), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.cactus"), Fluids.BIOMASS); RecipeUtil.addFermenterRecipes(new ItemStack(Items.wheat), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS); + RecipeUtil.addFermenterRecipes(new ItemStack(Items.potato), (2 * ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat")), Fluids.BIOMASS); RecipeUtil.addFermenterRecipes(new ItemStack(Items.reeds), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.cane"), Fluids.BIOMASS); RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.brown_mushroom), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS); RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.red_mushroom), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS); From b9478e16b7e28560f23159e8cddbccb64d7d0740 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Sun, 24 Jan 2016 15:49:31 -0600 Subject: [PATCH 06/21] Add Orchard farmland, dirt traversal for ic2 plants. --- src/main/java/forestry/farming/logic/FarmLogicOrchard.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java index edd440ffe..f8044d829 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java +++ b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java @@ -52,7 +52,7 @@ public class FarmLogicOrchard extends FarmLogic { super(housing); this.farmables = Farmables.farmables.get("farmOrchard"); ImmutableList.Builder traversalBlocksBuilder = ImmutableList.builder(); - if (PluginManager.Module.AGRICRAFT.isEnabled()) { + if (PluginManager.Module.AGRICRAFT.isEnabled() || PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) { traversalBlocksBuilder.add(Blocks.farmland); } if (PluginManager.Module.GROWTHCRAFT.isEnabled()) { @@ -61,6 +61,9 @@ public class FarmLogicOrchard extends FarmLogic { traversalBlocksBuilder.add(grapeVine); } } + if (PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) { + traversalBlocksBuilder.add(Blocks.dirt); + } if (PluginManager.Module.PLANTMEGAPACK.isEnabled()) { traversalBlocksBuilder.add(Blocks.water); } From 6265c01f60f24690c0f87222ed42aebc7c640aa5 Mon Sep 17 00:00:00 2001 From: mezz Date: Thu, 28 Jan 2016 20:37:26 -0800 Subject: [PATCH 07/21] Bump version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ab9d1f9aa..40a8e182a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ mcversion=1.7.10 forgeversion=10.13.4.1566-1.7.10 version_major=4 version_minor=2 -version_patch=5 +version_patch=6 From bbd39ea5c70c9802bfad3f9288772b422ff4f014 Mon Sep 17 00:00:00 2001 From: mezz Date: Mon, 1 Feb 2016 18:05:29 -0800 Subject: [PATCH 08/21] Fix #1053 NPE when loading with old configs --- gradle.properties | 2 +- src/main/java/forestry/plugins/PluginApiculture.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 40a8e182a..06022c37f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ mcversion=1.7.10 forgeversion=10.13.4.1566-1.7.10 version_major=4 version_minor=2 -version_patch=6 +version_patch=7 diff --git a/src/main/java/forestry/plugins/PluginApiculture.java b/src/main/java/forestry/plugins/PluginApiculture.java index 2af8c21cc..63668785a 100644 --- a/src/main/java/forestry/plugins/PluginApiculture.java +++ b/src/main/java/forestry/plugins/PluginApiculture.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Random; import java.util.Set; @@ -213,7 +214,7 @@ public class PluginApiculture extends ForestryPlugin { } LocalizedConfiguration config = new LocalizedConfiguration(configFile, "2.0.0"); - if (!config.getLoadedConfigVersion().equals(config.getDefinedConfigVersion())) { + if (!Objects.equals(config.getLoadedConfigVersion(), config.getDefinedConfigVersion())) { boolean deleted = configFile.delete(); if (deleted) { config = new LocalizedConfiguration(configFile, "2.0.0"); From 0876a50be2144f6e4db6356a8472789e2672a5a2 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Wed, 10 Feb 2016 08:17:58 -0600 Subject: [PATCH 09/21] Add missing null check to Growthcraft plugin. --- .../java/forestry/plugins/compat/PluginGrowthCraft.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java b/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java index 012a1477b..70ec748a0 100644 --- a/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java @@ -93,9 +93,11 @@ public class PluginGrowthCraft extends ForestryPlugin { } ItemStack emptyComb = new ItemStack(GameRegistry.findItem("Growthcraft|Bees", "grc.honeyComb"), 1, 0); - RecipeManagers.centrifugeManager.addRecipe(20, emptyComb, ImmutableMap.of( - PluginCore.items.beeswax.getItemStack(), 1.0f) - ); + if (emptyComb != null) { + RecipeManagers.centrifugeManager.addRecipe(20, emptyComb, ImmutableMap.of( + PluginCore.items.beeswax.getItemStack(), 1.0f) + ); + } if (PluginManager.Module.APICULTURE.isEnabled()) { ItemStack fullComb = new ItemStack(GameRegistry.findItem("Growthcraft|Bees", "grc.honeyComb"), 1, 1); From 91a5084bdedb0afd1c93a496b92c93aba5029d52 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Wed, 10 Feb 2016 15:29:26 -0600 Subject: [PATCH 10/21] Further cleanup GC plugin nulls. --- .../plugins/compat/PluginGrowthCraft.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java b/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java index 70ec748a0..867c02ffc 100644 --- a/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java @@ -13,6 +13,7 @@ package forestry.plugins.compat; import com.google.common.collect.ImmutableMap; import net.minecraft.block.Block; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.registry.GameRegistry; @@ -92,20 +93,20 @@ public class PluginGrowthCraft extends ForestryPlugin { Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(riceBlock, 7, true, false)); //need to set paddyfield to 7 } - ItemStack emptyComb = new ItemStack(GameRegistry.findItem("Growthcraft|Bees", "grc.honeyComb"), 1, 0); - if (emptyComb != null) { - RecipeManagers.centrifugeManager.addRecipe(20, emptyComb, ImmutableMap.of( - PluginCore.items.beeswax.getItemStack(), 1.0f) - ); - } - if (PluginManager.Module.APICULTURE.isEnabled()) { - ItemStack fullComb = new ItemStack(GameRegistry.findItem("Growthcraft|Bees", "grc.honeyComb"), 1, 1); - RecipeManagers.centrifugeManager.addRecipe(20, fullComb, ImmutableMap.of( - PluginCore.items.beeswax.getItemStack(), 1.0f, - PluginApiculture.items.honeyDrop.getItemStack(), 0.9f, - PluginApiculture.items.honeydew.getItemStack(), 0.1f) - ); + Item comb = GameRegistry.findItem("Growthcraft|Bees", "grc.honeyComb"); + if (comb != null) { + ItemStack emptyComb = new ItemStack(comb, 1, 0); + RecipeManagers.centrifugeManager.addRecipe(20, emptyComb, ImmutableMap.of( + PluginCore.items.beeswax.getItemStack(), 1.0f) + ); + ItemStack fullComb = new ItemStack(comb, 1, 1); + RecipeManagers.centrifugeManager.addRecipe(20, fullComb, ImmutableMap.of( + PluginCore.items.beeswax.getItemStack(), 1.0f, + PluginApiculture.items.honeyDrop.getItemStack(), 0.9f, + PluginApiculture.items.honeydew.getItemStack(), 0.1f) + ); + } } ItemStack bamboo = GameRegistry.findItemStack("Growthcraft|Bamboo", "grc.bamboo", 1); @@ -126,7 +127,7 @@ public class PluginGrowthCraft extends ForestryPlugin { ItemStack grapes = GameRegistry.findItemStack("Growthcraft|Grapes", "grc.grapes", 1); //squeeze - if (grapes != null) { + if (grapes.getItem() != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{grapes}, Fluids.JUICE.getFluid(juiceAmount)); BackpackManager.backpackItems[2].add(grapes); } From 7585c6a265685d0044d07f1a21ae20c620afbe8f Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Thu, 11 Feb 2016 00:48:38 -0600 Subject: [PATCH 11/21] Fix #1067 add module checks to BoP Plugin --- .../plugins/compat/PluginBiomesOPlenty.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java index eaee10493..1f7f00721 100644 --- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java +++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java @@ -72,16 +72,22 @@ public class PluginBiomesOPlenty extends ForestryPlugin { persimmon = new ItemStack(food, 1, 8); } - addFlowers(); - addFarmCrops(); + if (PluginManager.Module.APICULTURE.isEnabled()) { + addFlowers(); + } + if (PluginManager.Module.FARMING.isEnabled()) { + addFarmCrops(); + } } @Override protected void registerRecipes() { super.registerRecipes(); - addFermenterRecipes(); - addSqueezerRecipes(); + if (PluginManager.Module.FACTORY.isEnabled()) { + addFermenterRecipes(); + addSqueezerRecipes(); + } } private static void addFarmCrops() { @@ -100,12 +106,12 @@ public class PluginBiomesOPlenty extends ForestryPlugin { FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName)); } - if (PluginManager.Module.FARMING.isEnabled() && saplings != null && persimmon != null) { + if (saplings != null && persimmon != null) { Farmables.farmables.get("farmArboreal").add(new FarmableGenericSapling(saplings, 15, persimmon)); } Block boPTurnip = GameRegistry.findBlock(BoP, "turnip"); - if (PluginManager.Module.FARMING.isEnabled() && boPTurnip != null) { + if (boPTurnip != null) { Item boPTurnipSeeds = GameRegistry.findItem(BoP, "turnipSeeds"); if (boPTurnipSeeds != null) { Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(boPTurnipSeeds, 1, 0), boPTurnip, 7)); From 6cd9f33c3fcdc7ba58aa0e4a09b01db055cf9f1b Mon Sep 17 00:00:00 2001 From: mezz Date: Thu, 11 Feb 2016 17:35:21 -0800 Subject: [PATCH 12/21] Close #1060 Close #1065 Disable Growthcraft plugin for version 2.5.0+ --- .../farming/logic/FarmLogicOrchard.java | 17 ++++++++++------- .../plugins/compat/PluginGrowthCraft.java | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java index f8044d829..51939f79c 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java +++ b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java @@ -51,22 +51,25 @@ public class FarmLogicOrchard extends FarmLogic { public FarmLogicOrchard(IFarmHousing housing) { super(housing); this.farmables = Farmables.farmables.get("farmOrchard"); + ImmutableList.Builder traversalBlocksBuilder = ImmutableList.builder(); if (PluginManager.Module.AGRICRAFT.isEnabled() || PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) { traversalBlocksBuilder.add(Blocks.farmland); } - if (PluginManager.Module.GROWTHCRAFT.isEnabled()) { + if (PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) { + traversalBlocksBuilder.add(Blocks.dirt); + } + if (PluginManager.Module.PLANTMEGAPACK.isEnabled()) { + traversalBlocksBuilder.add(Blocks.water); + } + + { Block grapeVine = GameRegistry.findBlock("Growthcraft|Grapes", "grc.grapeVine1"); if (grapeVine != null) { traversalBlocksBuilder.add(grapeVine); } } - if (PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) { - traversalBlocksBuilder.add(Blocks.dirt); - } - if (PluginManager.Module.PLANTMEGAPACK.isEnabled()) { - traversalBlocksBuilder.add(Blocks.water); - } + traversalBlocksBuilder.build(); this.traversalBlocks = traversalBlocksBuilder.build(); } diff --git a/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java b/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java index 867c02ffc..b52529c30 100644 --- a/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginGrowthCraft.java @@ -40,7 +40,7 @@ public class PluginGrowthCraft extends ForestryPlugin { @Override public boolean isAvailable() { - return ModUtil.isModLoaded(GC); + return ModUtil.isModLoaded(GC, "[1.7.10-1.0.0,1.7.10-2.5.0)"); } @Override From 20ca044be046bca58ff489101da93da8e1f85a38 Mon Sep 17 00:00:00 2001 From: mezz Date: Thu, 11 Feb 2016 17:36:30 -0800 Subject: [PATCH 13/21] Bump version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 06022c37f..6cfa0b1ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ mcversion=1.7.10 forgeversion=10.13.4.1566-1.7.10 version_major=4 version_minor=2 -version_patch=7 +version_patch=8 From f4681d251cc554a21354de468f619826e3e19e84 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Fri, 12 Feb 2016 10:58:07 -0600 Subject: [PATCH 14/21] Increase seed oil yield of Harvestcraft peanuts, and tree nuts to be slightly more viable oil sources. --- src/main/java/forestry/plugins/compat/PluginHarvestCraft.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java b/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java index d018e88b8..abc5c49dc 100644 --- a/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java +++ b/src/main/java/forestry/plugins/compat/PluginHarvestCraft.java @@ -337,7 +337,7 @@ public class PluginHarvestCraft extends ForestryPlugin { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(cropnutBlock, 7)); } if (cropnut != null) { - RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[]{cropnut}, Fluids.SEEDOIL.getFluid(3 * seedamount)); + RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[]{cropnut}, Fluids.SEEDOIL.getFluid(12 * seedamount)); } } @@ -348,7 +348,7 @@ public class PluginHarvestCraft extends ForestryPlugin { Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(nutBlock, 2)); } if (nut != null) { - RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[]{nut}, Fluids.SEEDOIL.getFluid(3 * seedamount)); + RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[]{nut}, Fluids.SEEDOIL.getFluid(15 * seedamount)); } } From 77157aa9cbc990f91f81875466dac0b29c31cff4 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Fri, 12 Feb 2016 15:16:24 -0600 Subject: [PATCH 15/21] Add new pinecones from BoP to squeezable for seedoil. --- .../plugins/compat/PluginBiomesOPlenty.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java index 1f7f00721..3217693b3 100644 --- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java +++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java @@ -49,7 +49,9 @@ public class PluginBiomesOPlenty extends ForestryPlugin { private static Block saplings; private static Block colorizedSaplings; private static Item food; + private static Item misc; private static ItemStack persimmon; + private static int amount; @Override public boolean isAvailable() { @@ -84,6 +86,7 @@ public class PluginBiomesOPlenty extends ForestryPlugin { protected void registerRecipes() { super.registerRecipes(); + amount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed"); if (PluginManager.Module.FACTORY.isEnabled()) { addFermenterRecipes(); addSqueezerRecipes(); @@ -113,8 +116,12 @@ public class PluginBiomesOPlenty extends ForestryPlugin { Block boPTurnip = GameRegistry.findBlock(BoP, "turnip"); if (boPTurnip != null) { Item boPTurnipSeeds = GameRegistry.findItem(BoP, "turnipSeeds"); + ItemStack boPTurnipSeedStack = new ItemStack(boPTurnipSeeds, 1, 0); if (boPTurnipSeeds != null) { - Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(boPTurnipSeeds, 1, 0), boPTurnip, 7)); + Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(boPTurnipSeedStack, boPTurnip, 7)); + if (PluginManager.Module.FACTORY.isEnabled()) { + RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{boPTurnipSeedStack}, Fluids.SEEDOIL.getFluid(amount)); + } } Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(boPTurnip, 7)); @@ -135,6 +142,15 @@ public class PluginBiomesOPlenty extends ForestryPlugin { private static void addSqueezerRecipes() { ItemStack mulch = new ItemStack(PluginCore.items.mulch); + + misc = GameRegistry.findItem(BoP, "misc"); + if (misc != null) { + ItemStack pinecone = new ItemStack(misc, 1, 13); + if (pinecone != null) { + RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{pinecone}, Fluids.SEEDOIL.getFluid(3* amount)); + } + } + if (food != null) { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(food)}, Fluids.JUICE.getFluid(50), mulch, 5); } From 194c0a0e77a5eeca2060002ef9f69cbf24e9f208 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Thu, 18 Feb 2016 05:51:30 -0600 Subject: [PATCH 16/21] Add Red Sand, Sandstone to Fabricator->glass, slightly increase fabricator glasstank. --- src/main/java/forestry/factory/tiles/TileFabricator.java | 2 +- src/main/java/forestry/plugins/PluginFactory.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/forestry/factory/tiles/TileFabricator.java b/src/main/java/forestry/factory/tiles/TileFabricator.java index f03d786a3..51a538c0f 100644 --- a/src/main/java/forestry/factory/tiles/TileFabricator.java +++ b/src/main/java/forestry/factory/tiles/TileFabricator.java @@ -68,7 +68,7 @@ public class TileFabricator extends TilePowered implements ISlotPickupWatcher, I setEnergyPerWorkCycle(200); craftingInventory = new InventoryGhostCrafting<>(this, InventoryGhostCrafting.SLOT_CRAFTING_COUNT); setInternalInventory(new InventoryFabricator(this)); - moltenTank = new FilteredTank(2 * Constants.BUCKET_VOLUME, Fluids.GLASS.getFluid()); + moltenTank = new FilteredTank(5 * Constants.BUCKET_VOLUME, Fluids.GLASS.getFluid()); moltenTank.tankMode = StandardTank.TankMode.INTERNAL; tankManager = new TankManager(this, moltenTank); } diff --git a/src/main/java/forestry/plugins/PluginFactory.java b/src/main/java/forestry/plugins/PluginFactory.java index 192caa403..2295987cd 100644 --- a/src/main/java/forestry/plugins/PluginFactory.java +++ b/src/main/java/forestry/plugins/PluginFactory.java @@ -315,6 +315,8 @@ public class PluginFactory extends ForestryPlugin { RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.glass), Fluids.GLASS.getFluid(1000), 1000); RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.glass_pane), Fluids.GLASS.getFluid(375), 1000); RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand), Fluids.GLASS.getFluid(1000), 3000); + RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand,1,1), Fluids.GLASS.getFluid(1000), 3000); + RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone), Fluids.GLASS.getFluid(4000), 4800); // / CARPENTER RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(250), null, PluginCore.items.impregnatedCasing.getItemStack(), From 9c40b037512c5cc98142b4b086c3c970b21a219f Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Thu, 18 Feb 2016 06:05:42 -0600 Subject: [PATCH 17/21] Tank should probably be a multiple of 2, derp. --- src/main/java/forestry/factory/tiles/TileFabricator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forestry/factory/tiles/TileFabricator.java b/src/main/java/forestry/factory/tiles/TileFabricator.java index 51a538c0f..82e241aa6 100644 --- a/src/main/java/forestry/factory/tiles/TileFabricator.java +++ b/src/main/java/forestry/factory/tiles/TileFabricator.java @@ -68,7 +68,7 @@ public class TileFabricator extends TilePowered implements ISlotPickupWatcher, I setEnergyPerWorkCycle(200); craftingInventory = new InventoryGhostCrafting<>(this, InventoryGhostCrafting.SLOT_CRAFTING_COUNT); setInternalInventory(new InventoryFabricator(this)); - moltenTank = new FilteredTank(5 * Constants.BUCKET_VOLUME, Fluids.GLASS.getFluid()); + moltenTank = new FilteredTank(4 * Constants.BUCKET_VOLUME, Fluids.GLASS.getFluid()); moltenTank.tankMode = StandardTank.TankMode.INTERNAL; tankManager = new TankManager(this, moltenTank); } From 8ba8c0fb17e4738e26e7988a7858ac6ccb138826 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Thu, 18 Feb 2016 06:25:16 -0600 Subject: [PATCH 18/21] Forgot Sandstone had variants. Add variants->Fabricator. --- src/main/java/forestry/plugins/PluginFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/forestry/plugins/PluginFactory.java b/src/main/java/forestry/plugins/PluginFactory.java index 2295987cd..41bfc8f9f 100644 --- a/src/main/java/forestry/plugins/PluginFactory.java +++ b/src/main/java/forestry/plugins/PluginFactory.java @@ -317,6 +317,8 @@ public class PluginFactory extends ForestryPlugin { RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand), Fluids.GLASS.getFluid(1000), 3000); RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand,1,1), Fluids.GLASS.getFluid(1000), 3000); RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone), Fluids.GLASS.getFluid(4000), 4800); + RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone,1,1), Fluids.GLASS.getFluid(4000), 4800); + RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone,1,2), Fluids.GLASS.getFluid(4000), 4800); // / CARPENTER RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(250), null, PluginCore.items.impregnatedCasing.getItemStack(), From 0ed33cf9a339cd533b99f01afa1287acd852d427 Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Fri, 19 Feb 2016 12:41:35 -0600 Subject: [PATCH 19/21] Increase wax cast durability to 16, Fabricator tank to 8, Add 4 to 4 Plain glass Fabrication recipe, change stamp defs to be oreDictionary. --- src/main/java/forestry/apiculture/items/ItemWaxCast.java | 2 +- src/main/java/forestry/factory/tiles/TileFabricator.java | 2 +- .../java/forestry/mail/items/EnumStampDefinition.java | 8 ++++---- src/main/java/forestry/plugins/PluginFactory.java | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/forestry/apiculture/items/ItemWaxCast.java b/src/main/java/forestry/apiculture/items/ItemWaxCast.java index b2a2170bf..8a5f4ea9e 100755 --- a/src/main/java/forestry/apiculture/items/ItemWaxCast.java +++ b/src/main/java/forestry/apiculture/items/ItemWaxCast.java @@ -21,7 +21,7 @@ public class ItemWaxCast extends ItemForestry implements ICraftingPlan { public ItemWaxCast() { super(Tabs.tabApiculture); setMaxStackSize(1); - setMaxDamage(10); + setMaxDamage(16); setNoRepair(); } diff --git a/src/main/java/forestry/factory/tiles/TileFabricator.java b/src/main/java/forestry/factory/tiles/TileFabricator.java index 82e241aa6..da16b8ed3 100644 --- a/src/main/java/forestry/factory/tiles/TileFabricator.java +++ b/src/main/java/forestry/factory/tiles/TileFabricator.java @@ -68,7 +68,7 @@ public class TileFabricator extends TilePowered implements ISlotPickupWatcher, I setEnergyPerWorkCycle(200); craftingInventory = new InventoryGhostCrafting<>(this, InventoryGhostCrafting.SLOT_CRAFTING_COUNT); setInternalInventory(new InventoryFabricator(this)); - moltenTank = new FilteredTank(4 * Constants.BUCKET_VOLUME, Fluids.GLASS.getFluid()); + moltenTank = new FilteredTank(8 * Constants.BUCKET_VOLUME, Fluids.GLASS.getFluid()); moltenTank.tankMode = StandardTank.TankMode.INTERNAL; tankManager = new TankManager(this, moltenTank); } diff --git a/src/main/java/forestry/mail/items/EnumStampDefinition.java b/src/main/java/forestry/mail/items/EnumStampDefinition.java index 861a0220d..04784711f 100644 --- a/src/main/java/forestry/mail/items/EnumStampDefinition.java +++ b/src/main/java/forestry/mail/items/EnumStampDefinition.java @@ -21,12 +21,12 @@ import forestry.core.items.ItemOverlay; import forestry.plugins.PluginCore; public enum EnumStampDefinition implements ItemOverlay.IOverlayInfo { - P_1("1n", EnumPostage.P_1, PluginCore.items.apatite, new Color(0x4a8ca7), new Color(0xffffff)), + P_1("1n", EnumPostage.P_1, "gemApatite", new Color(0x4a8ca7), new Color(0xffffff)), P_2("2n", EnumPostage.P_2, "ingotCopper", new Color(0xe8c814), new Color(0xffffff)), P_5("5n", EnumPostage.P_5, "ingotTin", new Color(0x9c0707), new Color(0xffffff)), - P_10("10n", EnumPostage.P_10, Items.gold_ingot, new Color(0x7bd1b8), new Color(0xffffff)), - P_20("20n", EnumPostage.P_20, Items.diamond, new Color(0xff9031), new Color(0xfff7dd)), - P_50("50n", EnumPostage.P_50, Items.emerald, new Color(0x6431d7), new Color(0xfff7dd)), + P_10("10n", EnumPostage.P_10, "ingotGold", new Color(0x7bd1b8), new Color(0xffffff)), + P_20("20n", EnumPostage.P_20, "gemDiamond", new Color(0xff9031), new Color(0xfff7dd)), + P_50("50n", EnumPostage.P_50, "gemEmerald", new Color(0x6431d7), new Color(0xfff7dd)), P_100("100n", EnumPostage.P_100, Items.nether_star, new Color(0xd731ba), new Color(0xfff7dd)), // P_200("200n", EnumPostage.P_200, Items.nether_star, new Color(0xcd9831), new Color(0xfff7dd)), ; diff --git a/src/main/java/forestry/plugins/PluginFactory.java b/src/main/java/forestry/plugins/PluginFactory.java index 41bfc8f9f..fcad2a911 100644 --- a/src/main/java/forestry/plugins/PluginFactory.java +++ b/src/main/java/forestry/plugins/PluginFactory.java @@ -259,12 +259,16 @@ public class PluginFactory extends ForestryPlugin { if (PluginManager.Module.APICULTURE.isEnabled()) { ItemRegistryApiculture beeItems = PluginApiculture.items; FluidStack liquidGlass = Fluids.GLASS.getFluid(Constants.BUCKET_VOLUME); + FluidStack liquidGlassX4 = Fluids.GLASS.getFluid(Constants.BUCKET_VOLUME * 4); for (int i = 0; i < 16; i++) { RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlass, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{ "#", "X", '#', dyes[i], 'X', beeItems.propolis.getWildcard()}); } + RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlassX4, new ItemStack(Blocks.glass, 1, 0), new Object[]{ + "#", "X", + 'X', beeItems.propolis.getWildcard()}); } // / SQUEEZER From 897123c8835bd133c445b256d0672a9c7507d8dc Mon Sep 17 00:00:00 2001 From: Nirek-K Date: Fri, 19 Feb 2016 13:14:00 -0600 Subject: [PATCH 20/21] Add missing Snow diplacable tags for plugin flowers. --- .../plugins/compat/PluginBiomesOPlenty.java | 22 +++++++++---------- .../plugins/compat/PluginPlantMegaPack.java | 10 ++++----- .../plugins/compat/PluginWitchery.java | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java index 3217693b3..b05f7be13 100644 --- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java +++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java @@ -163,22 +163,22 @@ public class PluginBiomesOPlenty extends ForestryPlugin { private static void addFlowers() { Block flowers = GameRegistry.findBlock(BoP, "flowers"); if (flowers != null) { - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 0, 1.0, FlowerManager.FlowerTypeVanilla); //Clover - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 1, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeMushrooms); //Swampflower + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 0, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Clover + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 1, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow, FlowerManager.FlowerTypeMushrooms); //Swampflower // FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 2, 1.0, FlowerManager.FlowerTypeNether); //Deathbloom - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 3, 1.0, FlowerManager.FlowerTypeVanilla); //GlowFlower - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 4, 1.0, FlowerManager.FlowerTypeVanilla); //Blue Hydrangea - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 5, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeJungle); //Orange Cosmos - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 6, 1.0, FlowerManager.FlowerTypeVanilla); //Pink Daffodil - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 7, 1.0, FlowerManager.FlowerTypeVanilla); //WildFlower + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 3, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //GlowFlower + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 4, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Blue Hydrangea + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 5, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow, FlowerManager.FlowerTypeJungle); //Orange Cosmos + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 6, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Pink Daffodil + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 7, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //WildFlower FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 8, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Violet - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 9, 1.0, FlowerManager.FlowerTypeVanilla); // White Anemone - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 10, 1.0, FlowerManager.FlowerTypeVanilla); // Waterlily - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 11, 1.0, FlowerManager.FlowerTypeVanilla); //EnderLotus (does not actually spawn in the end) + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 9, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // White Anemone + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 10, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // Waterlily + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 11, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //EnderLotus (does not actually spawn in the end) FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 12, 1.0, FlowerManager.FlowerTypeCacti); //Bromeliad FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 13, 1.0, FlowerManager.FlowerTypeNether); // EyeBulb // FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 14, 1.0, FlowerManager.FlowerTypeNether); // Unlisted top of the eyebulb - FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 15, 1.0, FlowerManager.FlowerTypeVanilla); // Dandelion Puff + FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 15, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // Dandelion Puff } Block flowers2 = GameRegistry.findBlock(BoP, "flowers2"); diff --git a/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java b/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java index 5772a2d66..ba201a4bb 100644 --- a/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java +++ b/src/main/java/forestry/plugins/compat/PluginPlantMegaPack.java @@ -424,10 +424,10 @@ public class PluginPlantMegaPack extends ForestryPlugin { } } - addMetaFlower(desertPlant, FlowerManager.FlowerTypeCacti, false); - addMetaFlower(junglePlant, FlowerManager.FlowerTypeJungle, true); - addMetaFlower(vanillaPlant, FlowerManager.FlowerTypeVanilla, true); - addMetaFlower(fungusPlant, FlowerManager.FlowerTypeMushrooms, true); + addMetaFlower(desertPlant, false, FlowerManager.FlowerTypeCacti); + addMetaFlower(junglePlant, false, FlowerManager.FlowerTypeJungle); + addMetaFlower(vanillaPlant, true, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); + addMetaFlower(fungusPlant, true, FlowerManager.FlowerTypeMushrooms); for (Map.Entry special : specialCaseTwoTall.entrySet()) { Block plantBlock = GameRegistry.findBlock(PlantMP, special.getKey()); @@ -449,7 +449,7 @@ public class PluginPlantMegaPack extends ForestryPlugin { } } - private static void addMetaFlower(ImmutableMap flowerMap, String flowertype, boolean plantable) { + private static void addMetaFlower(ImmutableMap flowerMap, boolean plantable, String... flowertype) { for (Map.Entry flower : flowerMap.entrySet()) { Block flowerBlock = GameRegistry.findBlock(PlantMP, flower.getKey()); ItemStack flowerStack = GameRegistry.findItemStack(PlantMP, flower.getKey(), 1); diff --git a/src/main/java/forestry/plugins/compat/PluginWitchery.java b/src/main/java/forestry/plugins/compat/PluginWitchery.java index 0a815078e..9f10db127 100644 --- a/src/main/java/forestry/plugins/compat/PluginWitchery.java +++ b/src/main/java/forestry/plugins/compat/PluginWitchery.java @@ -84,7 +84,7 @@ public class PluginWitchery extends ForestryPlugin { for (String flowerAcceptName : flowersAccept) { Block flowerBlock = GameRegistry.findBlock(Witch, flowerAcceptName); if (flowerBlock != null) { - FlowerManager.flowerRegistry.registerAcceptableFlower(flowerBlock, FlowerManager.FlowerTypeVanilla); + FlowerManager.flowerRegistry.registerAcceptableFlower(flowerBlock, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); } } for (String cropDirectName : cropDirect) { From c1e00ff395beac9b87aab425b8d651817df97702 Mon Sep 17 00:00:00 2001 From: mezz Date: Fri, 19 Feb 2016 19:08:17 -0800 Subject: [PATCH 21/21] Do not save player profile properties to nbt --- src/main/java/forestry/core/access/AccessHandler.java | 1 + .../forestry/core/multiblock/MultiblockTileEntityForestry.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/forestry/core/access/AccessHandler.java b/src/main/java/forestry/core/access/AccessHandler.java index 82c9b07f8..3a4dc5adf 100644 --- a/src/main/java/forestry/core/access/AccessHandler.java +++ b/src/main/java/forestry/core/access/AccessHandler.java @@ -176,6 +176,7 @@ public final class AccessHandler implements IAccessHandler { if (this.owner != null) { NBTTagCompound nbt = new NBTTagCompound(); NBTUtil.func_152460_a(nbt, owner); + nbt.removeTag("Properties"); data.setTag("owner", nbt); } } diff --git a/src/main/java/forestry/core/multiblock/MultiblockTileEntityForestry.java b/src/main/java/forestry/core/multiblock/MultiblockTileEntityForestry.java index b6849870c..5e871b1b5 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockTileEntityForestry.java +++ b/src/main/java/forestry/core/multiblock/MultiblockTileEntityForestry.java @@ -61,6 +61,7 @@ public abstract class MultiblockTileEntityForestry e if (this.owner != null) { NBTTagCompound nbt = new NBTTagCompound(); NBTUtil.func_152460_a(nbt, owner); + nbt.removeTag("Properties"); data.setTag("owner", nbt); }