mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 20:12:19 +00:00
Ic2 crop module (#6)
* Added IC2-Crop-Module * Changed Lang repo * updated lang submodule
This commit is contained in:
1 parent
d2a086ac02
commit
d2545b7a59
34 files changed
+222
-150
No files matched your search
@@ -94,6 +94,7 @@ public abstract class Circuit implements ICircuit {
|
||||
public static ICircuit farmGourdManual;
|
||||
public static ICircuit farmCocoaManual;
|
||||
|
||||
public static ICircuit farmIC2CropsManual;
|
||||
public static ICircuit farmOrchardManual;
|
||||
public static ICircuit farmRubberManual;
|
||||
public static ICircuit farmEnderManaged;
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.items;
|
||||
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.plugins.PluginCore;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
public enum EnumElectronTube implements ItemOverlay.IOverlayInfo {
|
||||
@@ -25,7 +31,8 @@ public enum EnumElectronTube implements ItemOverlay.IOverlayInfo {
|
||||
EMERALD(new Color(0x00CC41)),
|
||||
APATITE(new Color(0x579CD9)),
|
||||
LAPIS(new Color(0x1c57c6)),
|
||||
ENDER(new Color(0x33adad), new Color(0x255661));
|
||||
ENDER(new Color(0x33adad), new Color(0x255661)),
|
||||
URANIUM(new Color(0xFF00CC41), new Color(0x33adad));
|
||||
|
||||
public static final EnumElectronTube[] VALUES = values();
|
||||
|
||||
@@ -62,4 +69,18 @@ public enum EnumElectronTube implements ItemOverlay.IOverlayInfo {
|
||||
public boolean isSecret() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void registerTubeRecipe(ItemStack stack) {
|
||||
if (stack != null){
|
||||
for (Object stackOreDict : RecipeUtil.getOreDictRecipeEquivalents(stack)) {
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), PluginCore.items.tubes.get(this, 4),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', "dustRedstone", 'X', stackOreDict});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void registerTubeRecipe(String stack) {
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), PluginCore.items.tubes.get(this, 4),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', "dustRedstone", 'X', stack});
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,8 @@ public class ItemOverlay extends ItemForestry {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int i, int j) {
|
||||
if (i < 0 || i >= overlays.length)
|
||||
return null;
|
||||
if (j > 0 && overlays[i].getSecondaryColor() != 0) {
|
||||
return secondaryIcon;
|
||||
} else {
|
||||
@@ -93,7 +95,7 @@ public class ItemOverlay extends ItemForestry {
|
||||
|
||||
@Override
|
||||
public int getRenderPasses(int metadata) {
|
||||
return overlays[metadata].getSecondaryColor() != 0 ? 2 : 1;
|
||||
return metadata < 0 || metadata >= overlays.length ? 0 : overlays[metadata].getSecondaryColor() != 0 ? 2 : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,6 +114,8 @@ public class ItemOverlay extends ItemForestry {
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack itemstack, int j) {
|
||||
if (itemstack.getItemDamage() < 0 || itemstack.getItemDamage() >= overlays.length)
|
||||
return 0;
|
||||
IOverlayInfo overlayInfo = overlays[itemstack.getItemDamage()];
|
||||
if (j == 0 || overlayInfo.getSecondaryColor() == 0) {
|
||||
return overlayInfo.getPrimaryColor();
|
||||
|
||||
@@ -59,7 +59,7 @@ public abstract class RecipeUtil {
|
||||
* Returns a list containing itemStack if there are no ore dictionary names.
|
||||
* Used for creating recipes that should accept equivalent itemStacks, based on the ore dictionary.
|
||||
*/
|
||||
public static List getOreDictRecipeEquivalents(ItemStack itemStack) {
|
||||
public static List<?> getOreDictRecipeEquivalents(ItemStack itemStack) {
|
||||
int[] oreDictIds = OreDictionary.getOreIDs(itemStack);
|
||||
List<String> oreDictNames = new ArrayList<>(oreDictIds.length);
|
||||
for (int oreId : oreDictIds) {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class FarmLogicArboreal extends FarmLogicHomogeneous {
|
||||
}
|
||||
|
||||
public FarmLogicArboreal(IFarmHousing housing) {
|
||||
super(housing, new ItemStack(Blocks.dirt), PluginCore.blocks.soil.get(BlockSoil.SoilType.HUMUS, 1), Farmables.farmables.get("farmArboreal"));
|
||||
super(housing, new ItemStack(Blocks.dirt), PluginCore.blocks.soil.get(BlockSoil.SoilType.HUMUS, 1), Farmables.farmables.get(FarmableReference.Arboreal.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ import forestry.api.farming.IFarmHousing;
|
||||
public class FarmLogicCereal extends FarmLogicCrops {
|
||||
|
||||
public FarmLogicCereal(IFarmHousing housing) {
|
||||
super(housing, Farmables.farmables.get("farmWheat"));
|
||||
super(housing, Farmables.farmables.get(FarmableReference.Wheat.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ import forestry.core.utils.vect.VectUtil;
|
||||
public class FarmLogicEnder extends FarmLogicHomogeneous {
|
||||
|
||||
public FarmLogicEnder(IFarmHousing housing) {
|
||||
super(housing, new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), Farmables.farmables.get("farmEnder"));
|
||||
super(housing, new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), Farmables.farmables.get(FarmableReference.Ender.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ public class FarmLogicGourd extends FarmLogic {
|
||||
|
||||
public FarmLogicGourd(IFarmHousing housing) {
|
||||
super(housing);
|
||||
Collection<IFarmable> farmables = Farmables.farmables.get("farmGourd");
|
||||
Collection<IFarmable> farmables = Farmables.farmables.get(FarmableReference.Gourd.get());
|
||||
seeds = farmables.toArray(new IFarmable[farmables.size()]);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.farming.logic;
|
||||
|
||||
import forestry.api.farming.Farmables;
|
||||
import forestry.api.farming.IFarmHousing;
|
||||
|
||||
//TODO: Make special Logic for Crops, maybe a virtual map of references to iterate faster?
|
||||
public class FarmLogicIC2Crops extends FarmLogicOrchard {
|
||||
public FarmLogicIC2Crops(IFarmHousing housing) {
|
||||
super(housing);
|
||||
this.farmables = Farmables.farmables.get(FarmableReference.IC2Crops.get());
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ import forestry.core.utils.vect.VectUtil;
|
||||
public class FarmLogicInfernal extends FarmLogicHomogeneous {
|
||||
|
||||
public FarmLogicInfernal(IFarmHousing housing) {
|
||||
super(housing, new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.soul_sand), Farmables.farmables.get("farmInfernal"));
|
||||
super(housing, new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.soul_sand), Farmables.farmables.get(FarmableReference.Infernal.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,13 +44,13 @@ import forestry.plugins.PluginManager;
|
||||
|
||||
public class FarmLogicOrchard extends FarmLogic {
|
||||
|
||||
private final Collection<IFarmable> farmables;
|
||||
private final HashMap<Vect, Integer> lastExtents = new HashMap<>();
|
||||
private final ImmutableList<Block> traversalBlocks;
|
||||
protected Collection<IFarmable> farmables;
|
||||
protected final HashMap<Vect, Integer> lastExtents = new HashMap<>();
|
||||
protected final ImmutableList<Block> traversalBlocks;
|
||||
|
||||
public FarmLogicOrchard(IFarmHousing housing) {
|
||||
super(housing);
|
||||
this.farmables = Farmables.farmables.get("farmOrchard");
|
||||
this.farmables = Farmables.farmables.get(FarmableReference.Orchard.get());
|
||||
|
||||
ImmutableList.Builder<Block> traversalBlocksBuilder = ImmutableList.builder();
|
||||
if (PluginManager.Module.AGRICRAFT.isEnabled() || PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class FarmLogicReeds extends FarmLogic {
|
||||
|
||||
public FarmLogicReeds(IFarmHousing housing) {
|
||||
super(housing);
|
||||
Collection<IFarmable> farmables = Farmables.farmables.get("farmPoales");
|
||||
Collection<IFarmable> farmables = Farmables.farmables.get(FarmableReference.Poales.get());
|
||||
germlings = farmables.toArray(new IFarmable[farmables.size()]);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import forestry.api.farming.IFarmHousing;
|
||||
public class FarmLogicShroom extends FarmLogicArboreal {
|
||||
|
||||
public FarmLogicShroom(IFarmHousing housing) {
|
||||
super(housing, new ItemStack(Blocks.mycelium), new ItemStack(Blocks.mycelium), Farmables.farmables.get("farmShroom"));
|
||||
super(housing, new ItemStack(Blocks.mycelium), new ItemStack(Blocks.mycelium), Farmables.farmables.get(FarmableReference.Shroom.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ public class FarmLogicSucculent extends FarmLogic {
|
||||
|
||||
public FarmLogicSucculent(IFarmHousing housing) {
|
||||
super(housing);
|
||||
Collection<IFarmable> farmables = Farmables.farmables.get("farmSucculentes");
|
||||
Collection<IFarmable> farmables = Farmables.farmables.get(FarmableReference.Succulentes.get());
|
||||
germlings = farmables.toArray(new IFarmable[farmables.size()]);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import forestry.api.farming.IFarmHousing;
|
||||
public class FarmLogicVegetable extends FarmLogicCrops {
|
||||
|
||||
public FarmLogicVegetable(IFarmHousing housing) {
|
||||
super(housing, Farmables.farmables.get("farmVegetables"));
|
||||
super(housing, Farmables.farmables.get(FarmableReference.Vegetables.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.farming.logic;
|
||||
|
||||
public enum FarmableReference {
|
||||
Arboreal,
|
||||
Wheat,
|
||||
Cocoa,
|
||||
Ender,
|
||||
Gourd,
|
||||
IC2Crops,
|
||||
Infernal,
|
||||
Orchard,
|
||||
Poales,
|
||||
Rubber,
|
||||
Shroom,
|
||||
Succulentes,
|
||||
Vegetables,
|
||||
|
||||
;
|
||||
|
||||
private final String VALUE;
|
||||
|
||||
public String get() {
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
FarmableReference() {
|
||||
VALUE = "farm" + this.name();
|
||||
}
|
||||
}
|
||||
@@ -227,29 +227,18 @@ public class PluginFactory extends ForestryPlugin {
|
||||
|
||||
// / FABRICATOR
|
||||
ItemElectronTube electronTube = PluginCore.items.tubes;
|
||||
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.COPPER, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotCopper"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.TIN, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotTin"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.BRONZE, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotBronze"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.IRON, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotIron"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.GOLD, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotGold"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.DIAMOND, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "gemDiamond"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.OBSIDIAN, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', Blocks.obsidian});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.BLAZE, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', Items.blaze_powder});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.EMERALD, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "gemEmerald"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.APATITE, 4),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', "dustRedstone", 'X', "gemApatite"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.LAPIS, 4),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', "dustRedstone", 'X', new ItemStack(Items.dye, 1, 4)});
|
||||
|
||||
EnumElectronTube.COPPER.registerTubeRecipe("ingotCopper");
|
||||
EnumElectronTube.BRONZE.registerTubeRecipe("ingotBronze");
|
||||
EnumElectronTube.TIN.registerTubeRecipe("ingotTin");
|
||||
EnumElectronTube.IRON.registerTubeRecipe("ingotIron");
|
||||
EnumElectronTube.GOLD.registerTubeRecipe("ingotGold");
|
||||
EnumElectronTube.DIAMOND.registerTubeRecipe("gemDiamond");
|
||||
EnumElectronTube.OBSIDIAN.registerTubeRecipe(new ItemStack(Blocks.obsidian));
|
||||
EnumElectronTube.BLAZE.registerTubeRecipe(new ItemStack(Items.blaze_powder));
|
||||
EnumElectronTube.EMERALD.registerTubeRecipe("gemEmerald");
|
||||
EnumElectronTube.APATITE.registerTubeRecipe("gemApatite");
|
||||
EnumElectronTube.LAPIS.registerTubeRecipe("gemLapis");
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.ENDER, 4),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', new ItemStack(Items.ender_eye, 1, 0), 'X', new ItemStack(Blocks.end_stone, 1, 0)});
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.regex.MatchResult;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import forestry.farming.logic.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -42,25 +43,6 @@ import forestry.core.utils.Log;
|
||||
import forestry.farming.blocks.BlockFarmType;
|
||||
import forestry.farming.blocks.BlockRegistryFarming;
|
||||
import forestry.farming.circuits.CircuitFarmLogic;
|
||||
import forestry.farming.logic.FarmLogicArboreal;
|
||||
import forestry.farming.logic.FarmLogicCereal;
|
||||
import forestry.farming.logic.FarmLogicCocoa;
|
||||
import forestry.farming.logic.FarmLogicGourd;
|
||||
import forestry.farming.logic.FarmLogicInfernal;
|
||||
import forestry.farming.logic.FarmLogicOrchard;
|
||||
import forestry.farming.logic.FarmLogicPeat;
|
||||
import forestry.farming.logic.FarmLogicReeds;
|
||||
import forestry.farming.logic.FarmLogicShroom;
|
||||
import forestry.farming.logic.FarmLogicSucculent;
|
||||
import forestry.farming.logic.FarmLogicVegetable;
|
||||
import forestry.farming.logic.FarmableBasicFruit;
|
||||
import forestry.farming.logic.FarmableGE;
|
||||
import forestry.farming.logic.FarmableGenericCrop;
|
||||
import forestry.farming.logic.FarmableGenericSapling;
|
||||
import forestry.farming.logic.FarmableGourd;
|
||||
import forestry.farming.logic.FarmableStacked;
|
||||
import forestry.farming.logic.FarmableVanillaMushroom;
|
||||
import forestry.farming.logic.FarmableVanillaSapling;
|
||||
import forestry.farming.proxy.ProxyFarming;
|
||||
import forestry.farming.render.EnumFarmBlockTexture;
|
||||
import forestry.farming.tiles.TileFarmControl;
|
||||
@@ -87,42 +69,41 @@ public class PluginFarming extends ForestryPlugin {
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
Farmables.farmables.put("farmArboreal", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmArboreal").add(new FarmableVanillaSapling());
|
||||
Farmables.farmables.put(FarmableReference.Arboreal.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Arboreal.get()).add(new FarmableVanillaSapling());
|
||||
if (PluginManager.Module.ARBORICULTURE.isEnabled()) {
|
||||
Farmables.farmables.get("farmArboreal").add(new FarmableGE());
|
||||
Farmables.farmables.get(FarmableReference.Arboreal.get()).add(new FarmableGE());
|
||||
}
|
||||
|
||||
Farmables.farmables.put("farmOrchard", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(Blocks.wheat, 7));
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(Blocks.potatoes, 7));
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(Blocks.carrots, 7));
|
||||
Farmables.farmables.put(FarmableReference.Orchard.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(Blocks.wheat, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(Blocks.potatoes, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(Blocks.carrots, 7));
|
||||
|
||||
Farmables.farmables.put("farmShroom", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmShroom").add(new FarmableVanillaMushroom(Blocks.brown_mushroom, 0));
|
||||
Farmables.farmables.get("farmShroom").add(new FarmableVanillaMushroom(Blocks.red_mushroom, 0));
|
||||
Farmables.farmables.put(FarmableReference.Shroom.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Shroom.get()).add(new FarmableVanillaMushroom(Blocks.brown_mushroom, 0));
|
||||
Farmables.farmables.get(FarmableReference.Shroom.get()).add(new FarmableVanillaMushroom(Blocks.red_mushroom, 0));
|
||||
|
||||
Farmables.farmables.put("farmWheat", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(new ItemStack(Items.wheat_seeds), Blocks.wheat, 7));
|
||||
Farmables.farmables.put(FarmableReference.Wheat.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(new ItemStack(Items.wheat_seeds), Blocks.wheat, 7));
|
||||
|
||||
Farmables.farmables.put("farmGourd", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmGourd").add(
|
||||
Farmables.farmables.put(FarmableReference.Gourd.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Gourd.get()).add(
|
||||
new FarmableGourd(new ItemStack(Items.pumpkin_seeds), new ItemStack(Blocks.pumpkin_stem), new ItemStack(Blocks.pumpkin)));
|
||||
Farmables.farmables.get("farmGourd").add(new FarmableGourd(new ItemStack(Items.melon_seeds), new ItemStack(Blocks.melon_stem), new ItemStack(Blocks.melon_block)));
|
||||
Farmables.farmables.get(FarmableReference.Gourd.get()).add(new FarmableGourd(new ItemStack(Items.melon_seeds), new ItemStack(Blocks.melon_stem), new ItemStack(Blocks.melon_block)));
|
||||
|
||||
Farmables.farmables.put("farmInfernal", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmInfernal").add(new FarmableGenericCrop(new ItemStack(Items.nether_wart), Blocks.nether_wart, 3));
|
||||
Farmables.farmables.put(FarmableReference.Infernal.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Infernal.get()).add(new FarmableGenericCrop(new ItemStack(Items.nether_wart), Blocks.nether_wart, 3));
|
||||
|
||||
Farmables.farmables.put("farmPoales", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmPoales").add(new FarmableStacked(Blocks.reeds, 3, 0));
|
||||
Farmables.farmables.put(FarmableReference.Poales.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Poales.get()).add(new FarmableStacked(Blocks.reeds, 3, 0));
|
||||
|
||||
Farmables.farmables.put("farmSucculentes", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmSucculentes").add(new FarmableStacked(Blocks.cactus, 3, 0));
|
||||
Farmables.farmables.put(FarmableReference.Succulentes.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Succulentes.get()).add(new FarmableStacked(Blocks.cactus, 3, 0));
|
||||
|
||||
Farmables.farmables.put("farmVegetables", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(Items.potato), Blocks.potatoes, 7));
|
||||
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(Items.carrot), Blocks.carrots, 7));
|
||||
Farmables.farmables.put(FarmableReference.Vegetables.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.Vegetables.get()).add(new FarmableGenericCrop(new ItemStack(Items.potato), Blocks.potatoes, 7));
|
||||
Farmables.farmables.get(FarmableReference.Vegetables.get()).add(new FarmableGenericCrop(new ItemStack(Items.carrot), Blocks.carrots, 7));
|
||||
|
||||
proxy.initializeRendering();
|
||||
|
||||
@@ -165,6 +146,9 @@ public class PluginFarming extends ForestryPlugin {
|
||||
Circuit.farmCocoaManual = new CircuitFarmLogic("manualCocoa", FarmLogicCocoa.class).setManual();
|
||||
|
||||
Circuit.farmOrchardManual = new CircuitFarmLogic("manualOrchard", FarmLogicOrchard.class);
|
||||
|
||||
if (PluginManager.Module.FARMING.isEnabled() && GameRegistry.findBlock("IC2", "blockCrop") != null)
|
||||
Circuit.farmIC2CropsManual = new CircuitFarmLogic("manualIC2Crop", FarmLogicIC2Crops.class).setManual();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -342,5 +326,7 @@ public class PluginFarming extends ForestryPlugin {
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, PluginCore.items.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuit.farmGourdManual);
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, PluginCore.items.tubes.get(EnumElectronTube.APATITE, 1), Circuit.farmShroomManual);
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, PluginCore.items.tubes.get(EnumElectronTube.LAPIS, 1), Circuit.farmCocoaManual);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ package forestry.plugins.compat;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -92,7 +93,7 @@ public class PluginAgriCraft extends ForestryPlugin {
|
||||
|
||||
Block cropBlock = GameRegistry.findBlock(AgriCraft, "crops");
|
||||
if (cropBlock != null && PluginManager.Module.FARMING.isEnabled()) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicAgricraft(cropBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicAgricraft(cropBlock, 7));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ package forestry.plugins.compat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -110,7 +111,7 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
|
||||
}
|
||||
|
||||
if (saplings != null && persimmon != null) {
|
||||
Farmables.farmables.get("farmArboreal").add(new FarmableGenericSapling(saplings, 15, persimmon));
|
||||
Farmables.farmables.get(FarmableReference.Arboreal.get()).add(new FarmableGenericSapling(saplings, 15, persimmon));
|
||||
}
|
||||
|
||||
Block boPTurnip = GameRegistry.findBlock(BoP, "turnip");
|
||||
@@ -118,13 +119,13 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
|
||||
Item boPTurnipSeeds = GameRegistry.findItem(BoP, "turnipSeeds");
|
||||
ItemStack boPTurnipSeedStack = new ItemStack(boPTurnipSeeds, 1, 0);
|
||||
if (boPTurnipSeeds != null) {
|
||||
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(boPTurnipSeedStack, boPTurnip, 7));
|
||||
Farmables.farmables.get(FarmableReference.Vegetables.get()).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));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(boPTurnip, 7));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.plugins.compat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -54,10 +55,10 @@ public class PluginExtraUtilities extends ForestryPlugin {
|
||||
super.doInit();
|
||||
|
||||
Block exUEnderLilly = GameRegistry.findBlock(ExU, "plant/ender_lilly");
|
||||
Farmables.farmables.put("farmEnder", new ArrayList<IFarmable>());
|
||||
Farmables.farmables.put(FarmableReference.Ender.get(), new ArrayList<IFarmable>());
|
||||
if (Config.isExUtilEnderLilyEnabled()) {
|
||||
Circuit.farmEnderManaged = new CircuitFarmLogic("managedEnder", FarmLogicEnder.class);
|
||||
Farmables.farmables.get("farmEnder").add(new FarmableGenericCrop(new ItemStack(exUEnderLilly, 1, 0), exUEnderLilly, 7));
|
||||
Farmables.farmables.get(FarmableReference.Ender.get()).add(new FarmableGenericCrop(new ItemStack(exUEnderLilly, 1, 0), exUEnderLilly, 7));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.plugins.compat;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -86,11 +87,11 @@ public class PluginGrowthCraft extends ForestryPlugin {
|
||||
}
|
||||
Block hopVine = GameRegistry.findBlock("Growthcraft|Hops", "grc.hopVine");
|
||||
if (hopVine != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(hopVine, 3, false, false)); // need custom fruit to weed out rope
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicGrowthCraft(hopVine, 3, false, false)); // need custom fruit to weed out rope
|
||||
}
|
||||
Block riceBlock = GameRegistry.findBlock("Growthcraft|Rice", "grc.riceBlock");
|
||||
if (riceBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(riceBlock, 7, true, false)); //need to set paddyfield to 7
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicGrowthCraft(riceBlock, 7, true, false)); //need to set paddyfield to 7
|
||||
}
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
@@ -133,7 +134,7 @@ public class PluginGrowthCraft extends ForestryPlugin {
|
||||
}
|
||||
Block grapeBlock = GameRegistry.findBlock("Growthcraft|Grapes", "grc.grapeBlock");
|
||||
if (grapeBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(grapeBlock, 0, false, true));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicGrowthCraft(grapeBlock, 0, false, true));
|
||||
}
|
||||
|
||||
ItemStack bambooLeaves = GameRegistry.findItemStack("Growthcraft|Bamboo", "grc.bambooLeaves", 1);
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.plugins.compat;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -207,8 +208,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{berrySeed}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(berrySeed, berryBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(berryBlock, 7));
|
||||
}
|
||||
plants.add(berryName);
|
||||
}
|
||||
@@ -225,8 +226,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{fruitSeed}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(fruitSeed, fruitBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(fruitBlock, 7));
|
||||
}
|
||||
plants.add(fruitName);
|
||||
}
|
||||
@@ -244,8 +245,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{vegetableSeed}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Vegetables.get()).add(new FarmableGenericCrop(vegetableSeed, vegetableBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(vegetableBlock, 7));
|
||||
}
|
||||
plants.add(vegetableName);
|
||||
}
|
||||
@@ -263,8 +264,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.moistenerManager.addRecipe(grainSeed, new ItemStack(Blocks.mycelium), 5000);
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(grainSeed, grainBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(grainBlock, 7));
|
||||
}
|
||||
plants.add(grainName);
|
||||
}
|
||||
@@ -273,7 +274,7 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
ItemStack treeFruit = GameRegistry.findItemStack(HC, treeFruitName + "Item", 1);
|
||||
Block treeFruitBlock = GameRegistry.findBlock(HC, "pam" + (Character.toUpperCase(treeFruitName.charAt(0)) + treeFruitName.substring(1)));
|
||||
if (PluginManager.Module.FARMING.isEnabled() && treeFruitBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(treeFruitBlock, 2));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(treeFruitBlock, 2));
|
||||
}
|
||||
if (treeFruit != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{treeFruit}, Fluids.JUICE.getFluid(juiceAmount));
|
||||
@@ -284,7 +285,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 (PluginManager.Module.FARMING.isEnabled() && fruitBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(fruitBlock, 2));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(fruitBlock, 2));
|
||||
}
|
||||
plants.add(treeName);
|
||||
}
|
||||
@@ -292,7 +293,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 (PluginManager.Module.FARMING.isEnabled() && fruitBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(fruitBlock, 2));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(fruitBlock, 2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,8 +304,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{genericCropSeed}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(genericCropSeed, genericCropBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(genericCropBlock, 7));
|
||||
}
|
||||
plants.add(cropName);
|
||||
}
|
||||
@@ -315,8 +316,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{mustardCropSeed}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(mustardCropSeed, mustardCropBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(mustardCropBlock, 7));
|
||||
}
|
||||
if (mustardFruit != null) {
|
||||
RecipeUtil.addFermenterRecipes(mustardFruit, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
@@ -337,8 +338,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{cropnutSeed}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
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));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(cropnutSeed, cropnutBlock, 7));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(cropnutBlock, 7));
|
||||
}
|
||||
if (cropnut != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[]{cropnut}, Fluids.SEEDOIL.getFluid(12 * seedamount));
|
||||
@@ -349,7 +350,7 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
ItemStack nut = GameRegistry.findItemStack(HC, nutName + "Item", 1);
|
||||
Block nutBlock = GameRegistry.findBlock(HC, "pam" + (Character.toUpperCase(nutName.charAt(0)) + nutName.substring(1)));
|
||||
if (PluginManager.Module.FARMING.isEnabled() && nutBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(nutBlock, 2));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(nutBlock, 2));
|
||||
}
|
||||
if (nut != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[]{nut}, Fluids.SEEDOIL.getFluid(15 * seedamount));
|
||||
|
||||
@@ -18,7 +18,9 @@ import java.util.EnumSet;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.farming.Farmables;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.farming.logic.FarmableBasicIC2Crop;
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import ic2.api.crops.ICropTile;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -86,6 +88,7 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
private static ItemStack rubberleaves;
|
||||
private static ItemStack emptyCell;
|
||||
private static ItemStack lavaCell;
|
||||
private static ItemStack uran238;
|
||||
private static ItemStack waterCell;
|
||||
private static ItemStack rubber;
|
||||
private static ItemStack scrap;
|
||||
@@ -160,6 +163,8 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
silver = IC2Items.getItem("silverIngot");
|
||||
brass = IC2Items.getItem("bronzeIngot");
|
||||
|
||||
uran238 = IC2Items.getItem("Uran238");
|
||||
|
||||
Circuit.farmRubberManual = new CircuitFarmLogic("manualRubber", FarmLogicRubber.class);
|
||||
|
||||
ICircuitLayout layoutEngineTin = new CircuitLayout("engine.tin", CircuitSocketType.ELECTRIC_ENGINE);
|
||||
@@ -243,12 +248,8 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
@Optional.Method(modid = "IC2")
|
||||
protected void registerRecipes() {
|
||||
|
||||
if (rubber != null) {
|
||||
for (Object rubberOreDict : RecipeUtil.getOreDictRecipeEquivalents(rubber)) {
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), PluginCore.items.tubes.get(EnumElectronTube.RUBBER, 4),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', "dustRedstone", 'X', rubberOreDict});
|
||||
}
|
||||
}
|
||||
EnumElectronTube.RUBBER.registerTubeRecipe(rubber);
|
||||
EnumElectronTube.URANIUM.registerTubeRecipe(uran238);
|
||||
|
||||
if (plantBall != null) {
|
||||
RecipeUtil.addFermenterRecipes(plantBall, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
|
||||
@@ -310,7 +311,10 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
|
||||
Block ic2Crop = GameRegistry.findBlock("IC2", "blockCrop");
|
||||
if (PluginManager.Module.FARMING.isEnabled() && ic2Crop != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicIC2Crop());
|
||||
ICircuitLayout layoutManaged = ChipsetManager.circuitRegistry.getLayout("forestry.farms.manual");
|
||||
ChipsetManager.solderManager.addRecipe(layoutManaged, PluginCore.items.tubes.get(EnumElectronTube.URANIUM, 1), Circuit.farmIC2CropsManual);
|
||||
Farmables.farmables.put(FarmableReference.IC2Crops.get(), new ArrayList<>());
|
||||
Farmables.farmables.get(FarmableReference.IC2Crops.get()).add(new FarmableBasicIC2Crop());
|
||||
}
|
||||
|
||||
BlockRegistryEnergy energyBlocks = PluginEnergy.blocks;
|
||||
@@ -341,10 +345,7 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
*/
|
||||
@Optional.Method(modid = "IC2")
|
||||
public boolean isIC2Crop(TileEntity tileEntity) {
|
||||
if (tileEntity != null && tileEntity instanceof ICropTile) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return tileEntity instanceof ICropTile;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -359,9 +360,7 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
if (crop.getCrop() == null) {
|
||||
return false;
|
||||
}
|
||||
if (crop.getSize() == crop.getCrop().getOptimalHavestSize(crop)) {
|
||||
return true;
|
||||
}
|
||||
return crop.getSize() == crop.getCrop().getOptimalHavestSize(crop);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins.compat;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -49,7 +50,7 @@ public class PluginImmersiveEngineering extends ForestryPlugin {
|
||||
int seedAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed");
|
||||
if (hempSeed != null && hempCrop != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{hempSeed}, Fluids.SEEDOIL.getFluid(seedAmount));
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(hempSeed, hempCrop, 4, hempFiber));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(hempSeed, hempCrop, 4, hempFiber));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.plugins.compat;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -268,7 +269,7 @@ public class PluginMagicalCrops extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{seed}, Fluids.SEEDOIL.getFluid(fluidAmount));
|
||||
}
|
||||
if (seed != null && crop != null && Config.isMagicalCropsSupportEnabled()) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seed, crop, 7));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(seed, crop, 7));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +277,7 @@ public class PluginMagicalCrops extends ForestryPlugin {
|
||||
ItemStack seed = GameRegistry.findItemStack(MagCrop, middlefix + name + seedSuffix, 1);
|
||||
Block crop = GameRegistry.findBlock(MagCrop, middlefix + name + cropSuffix);
|
||||
if (seed != null && crop != null && Config.isMagicalCropsSupportEnabled()) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seed, crop, 7));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(seed, crop, 7));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ package forestry.plugins.compat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -218,8 +219,8 @@ public class PluginNatura extends ForestryPlugin {
|
||||
}
|
||||
|
||||
Block cropBlock = GameRegistry.findBlock(NATURA, "N Crops");
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seedBarley, cropBlock, 3));
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seedCotton, cropBlock, 8));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(seedBarley, cropBlock, 3));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(seedCotton, cropBlock, 8));
|
||||
|
||||
List<ItemStack> berries = new ArrayList<>();
|
||||
if (berryBlight != null) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -375,7 +376,7 @@ public class PluginPlantMegaPack extends ForestryPlugin {
|
||||
if (reedBlock != null && reedStack != null) {
|
||||
RecipeUtil.addFermenterRecipes(reedStack, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
if (PluginManager.Module.FARMING.isEnabled()) {
|
||||
Farmables.farmables.get("farmPoales").add(new FarmableStacked(reedBlock, 14, 4));
|
||||
Farmables.farmables.get(FarmableReference.Poales.get()).add(new FarmableStacked(reedBlock, 14, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -392,8 +393,8 @@ public class PluginPlantMegaPack extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{seedStack}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
}
|
||||
if (PluginManager.Module.FARMING.isEnabled()) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seedStack, landCropBlock, 4));
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(landCropBlock, 4));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(seedStack, landCropBlock, 4));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(landCropBlock, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -410,7 +411,7 @@ public class PluginPlantMegaPack extends ForestryPlugin {
|
||||
for (Map.Entry<String, Integer> wPlant : floatingWaterPlant.entrySet()) {
|
||||
Block waterPlantBlock = GameRegistry.findBlock(PlantMP, wPlant.getKey());
|
||||
if (PluginManager.Module.FARMING.isEnabled() && waterPlantBlock != null) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(waterPlantBlock, wPlant.getValue()));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(waterPlantBlock, wPlant.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,8 +427,8 @@ public class PluginPlantMegaPack extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{foodStack}, Fluids.JUICE.getFluid(juiceAmount));
|
||||
}
|
||||
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()));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(berryBushStack, berryBushCropBlock, berryBushCrop.getValue()));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(berryBushCropBlock, berryBushCrop.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -444,7 +445,7 @@ public class PluginPlantMegaPack extends ForestryPlugin {
|
||||
FlowerManager.flowerRegistry.registerAcceptableFlower(plantBlock, special.getValue());
|
||||
FlowerManager.flowerRegistry.registerPlantableFlower(plantBlock, 0, 0.75, special.getValue());
|
||||
if (PluginManager.Module.FARMING.isEnabled()) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(specialStack, plantBlock, 4));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(specialStack, plantBlock, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -466,9 +467,9 @@ public class PluginPlantMegaPack extends ForestryPlugin {
|
||||
FlowerManager.flowerRegistry.registerPlantableFlower(flowerBlock, 0, 0.75, flowertype);
|
||||
}
|
||||
if (PluginManager.Module.FARMING.isEnabled() && flowerStack != null && flowerBlock != null) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(flowerStack, flowerBlock, flower.getValue()));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(flowerStack, flowerBlock, flower.getValue()));
|
||||
if (flower.getValue() < 5) {
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(flowerBlock, flower.getValue()));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(flowerBlock, flower.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins.compat;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -55,8 +56,8 @@ public class PluginRotaryCraft extends ForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{canolaSeed}, Fluids.SEEDOIL.getFluid(seedAmount));
|
||||
}
|
||||
if(PluginManager.Module.FARMING.isEnabled()) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(canolaSeed, canolaCrop, 9));
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(canolaCrop, 9));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(canolaSeed, canolaCrop, 9));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(canolaCrop, 9));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import forestry.farming.logic.FarmableReference;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -91,8 +92,8 @@ public class PluginWitchery extends ForestryPlugin {
|
||||
Block cropDirectBlock = GameRegistry.findBlock(Witch, cropDirectName + "plant");
|
||||
ItemStack cropDirectStack = GameRegistry.findItemStack(Witch, cropDirectName, 1);
|
||||
if (cropDirectStack != null && cropDirectBlock != null) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(cropDirectStack, cropDirectBlock, 5));
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(cropDirectBlock, 5));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(cropDirectStack, cropDirectBlock, 5));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(cropDirectBlock, 5));
|
||||
}
|
||||
}
|
||||
for (Map.Entry<String, Integer> cropSeedName : cropSeed.entrySet()) {
|
||||
@@ -100,13 +101,13 @@ public class PluginWitchery extends ForestryPlugin {
|
||||
ItemStack cropSeedStack = GameRegistry.findItemStack(Witch, "seeds" + cropSeedName.getKey(), 1);
|
||||
if (cropSeedStack != null && cropSeedBlock != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{cropSeedStack}, Fluids.SEEDOIL.getFluid(seedamount));
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(cropSeedStack, cropSeedBlock, cropSeedName.getValue()));
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(cropSeedBlock, cropSeedName.getValue()));
|
||||
Farmables.farmables.get(FarmableReference.Wheat.get()).add(new FarmableGenericCrop(cropSeedStack, cropSeedBlock, cropSeedName.getValue()));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(cropSeedBlock, cropSeedName.getValue()));
|
||||
}
|
||||
|
||||
}
|
||||
Block artichokeBlock = GameRegistry.findBlock(Witch, "artichoke");
|
||||
Farmables.farmables.get("farmOrchard").add(new FarmableBasicFruit(artichokeBlock, 4));
|
||||
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(artichokeBlock, 4));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user