mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-24 05:44:24 +00:00
Merge branch 'dev' into 4.2
This commit is contained in:
commit
53f4107ee3
8 files changed
+50
-24
No files matched your search
@@ -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
|
||||
|
||||
@@ -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()];
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class FarmLogicOrchard extends FarmLogic {
|
||||
super(housing);
|
||||
this.farmables = Farmables.farmables.get("farmOrchard");
|
||||
ImmutableList.Builder<Block> 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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,12 +100,12 @@ 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) {
|
||||
if (PluginManager.Module.FARMING.isEnabled() && 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));
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
@@ -343,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) {
|
||||
|
||||
@@ -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<String, Integer> 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()));
|
||||
|
||||
Reference in new issue
Block a user