mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Fix #2130 Can't insert Immersive engineering industrial hemp into crop multifarm block
This commit is contained in:
1 parent
e90ab8caf6
commit
ebe6580aaf
23 files changed
+109
-64
No files matched your search
@@ -5,9 +5,11 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileArboretum extends TilePlanter {
|
||||
public TileArboretum() {
|
||||
super("farmArboreal");
|
||||
super(ForestryFarmIdentifier.ARBOREAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,10 +4,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.core.ModuleCore;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileBog extends TilePlanter {
|
||||
public TileBog() {
|
||||
super("farmPeat");
|
||||
super(ForestryFarmIdentifier.PEAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,9 +5,11 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileFarmCrops extends TilePlanter {
|
||||
public TileFarmCrops() {
|
||||
super("farmCrops");
|
||||
super(ForestryFarmIdentifier.CROPS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,9 +5,11 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileFarmEnder extends TilePlanter {
|
||||
public TileFarmEnder() {
|
||||
super("farmEnder");
|
||||
super(ForestryFarmIdentifier.ENDER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,9 +4,11 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileFarmGourd extends TilePlanter {
|
||||
public TileFarmGourd() {
|
||||
super("farmGourd");
|
||||
super(ForestryFarmIdentifier.GOURD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,9 +4,11 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileFarmMushroom extends TilePlanter {
|
||||
public TileFarmMushroom() {
|
||||
super("farmShroom");
|
||||
super(ForestryFarmIdentifier.SHROOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,9 +5,11 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TileFarmNether extends TilePlanter {
|
||||
public TileFarmNether() {
|
||||
super("farmInfernal");
|
||||
super(ForestryFarmIdentifier.INFERNAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,10 +3,12 @@ package forestry.cultivation.tiles;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class TilePlantation extends TilePlanter {
|
||||
|
||||
public TilePlantation() {
|
||||
super("farmRubber");
|
||||
super(ForestryFarmIdentifier.RUBBER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -72,6 +72,7 @@ import forestry.farming.logic.FarmLogicOrchard;
|
||||
import forestry.farming.logic.FarmLogicPeat;
|
||||
import forestry.farming.logic.FarmLogicReeds;
|
||||
import forestry.farming.logic.FarmLogicSucculent;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.farming.logic.farmables.FarmableChorus;
|
||||
import forestry.farming.logic.farmables.FarmableGE;
|
||||
@@ -129,33 +130,33 @@ public class ModuleFarming extends BlankForestryModule {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
IFarmRegistry registry = ForestryAPI.farmRegistry;
|
||||
|
||||
registry.registerFarmables("farmArboreal", new FarmableVanillaSapling());
|
||||
registry.registerFarmables(ForestryFarmIdentifier.ARBOREAL, new FarmableVanillaSapling());
|
||||
if (ModuleHelper.isEnabled(ForestryModuleUids.ARBORICULTURE)) {
|
||||
registry.registerFarmables("farmArboreal", new FarmableGE());
|
||||
registry.registerFarmables(ForestryFarmIdentifier.ARBOREAL, new FarmableGE());
|
||||
}
|
||||
|
||||
registry.registerFarmables("farmCrops",
|
||||
registry.registerFarmables(ForestryFarmIdentifier.CROPS,
|
||||
new FarmableAgingCrop(new ItemStack(Items.WHEAT_SEEDS), Blocks.WHEAT, BlockCrops.AGE, 7, 0),
|
||||
new FarmableAgingCrop(new ItemStack(Items.POTATO), Blocks.POTATOES, BlockCrops.AGE, 7, 0),
|
||||
new FarmableAgingCrop(new ItemStack(Items.CARROT), Blocks.CARROTS, BlockCrops.AGE, 7, 0),
|
||||
new FarmableAgingCrop(new ItemStack(Items.BEETROOT_SEEDS), Blocks.BEETROOTS, BlockBeetroot.BEETROOT_AGE, 3, 0));
|
||||
|
||||
IBlockState plantedBrownMushroom = blocks.mushroom.getDefaultState().withProperty(BlockMushroom.VARIANT, BlockMushroom.MushroomType.BROWN);
|
||||
registry.registerFarmables("farmShroom", new FarmableVanillaMushroom(new ItemStack(Blocks.BROWN_MUSHROOM), plantedBrownMushroom, Blocks.BROWN_MUSHROOM_BLOCK));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.SHROOM, new FarmableVanillaMushroom(new ItemStack(Blocks.BROWN_MUSHROOM), plantedBrownMushroom, Blocks.BROWN_MUSHROOM_BLOCK));
|
||||
|
||||
IBlockState plantedRedMushroom = blocks.mushroom.getDefaultState().withProperty(BlockMushroom.VARIANT, BlockMushroom.MushroomType.RED);
|
||||
registry.registerFarmables("farmShroom", new FarmableVanillaMushroom(new ItemStack(Blocks.RED_MUSHROOM), plantedRedMushroom, Blocks.RED_MUSHROOM_BLOCK));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.SHROOM, new FarmableVanillaMushroom(new ItemStack(Blocks.RED_MUSHROOM), plantedRedMushroom, Blocks.RED_MUSHROOM_BLOCK));
|
||||
|
||||
registry.registerFarmables("farmGourd", new FarmableGourd(new ItemStack(Items.PUMPKIN_SEEDS), Blocks.PUMPKIN_STEM, Blocks.PUMPKIN));
|
||||
registry.registerFarmables("farmGourd", new FarmableGourd(new ItemStack(Items.MELON_SEEDS), Blocks.MELON_STEM, Blocks.MELON_BLOCK));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.GOURD, new FarmableGourd(new ItemStack(Items.PUMPKIN_SEEDS), Blocks.PUMPKIN_STEM, Blocks.PUMPKIN));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.GOURD, new FarmableGourd(new ItemStack(Items.MELON_SEEDS), Blocks.MELON_STEM, Blocks.MELON_BLOCK));
|
||||
|
||||
registry.registerFarmables("farmInfernal", new FarmableAgingCrop(new ItemStack(Items.NETHER_WART), Blocks.NETHER_WART, BlockNetherWart.AGE, 3));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.INFERNAL, new FarmableAgingCrop(new ItemStack(Items.NETHER_WART), Blocks.NETHER_WART, BlockNetherWart.AGE, 3));
|
||||
|
||||
registry.registerFarmables("farmPoales", new FarmableStacked(new ItemStack(Items.REEDS), Blocks.REEDS, 3));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.POALES, new FarmableStacked(new ItemStack(Items.REEDS), Blocks.REEDS, 3));
|
||||
|
||||
registry.registerFarmables("farmSucculentes", new FarmableStacked(new ItemStack(Blocks.CACTUS), Blocks.CACTUS, 3));
|
||||
registry.registerFarmables(ForestryFarmIdentifier.SUCCULENTES, new FarmableStacked(new ItemStack(Blocks.CACTUS), Blocks.CACTUS, 3));
|
||||
|
||||
registry.registerFarmables("farmEnder", FarmableChorus.INSTANCE);
|
||||
registry.registerFarmables(ForestryFarmIdentifier.ENDER, FarmableChorus.INSTANCE);
|
||||
|
||||
//Forestry fertilizer
|
||||
registry.registerFertilizer(new ItemStack(coreItems.fertilizerCompound, 1, OreDictionary.WILDCARD_VALUE), 500);
|
||||
@@ -192,17 +193,17 @@ public class ModuleFarming extends BlankForestryModule {
|
||||
IFarmRegistry registry = FarmRegistry.getInstance();
|
||||
BlockRegistryCore coreBlocks = ModuleCore.getBlocks();
|
||||
|
||||
IFarmProperties arborealFarm = registry.registerLogic("farmArboreal", FarmLogicArboreal::new);
|
||||
IFarmProperties cropsFarm = registry.registerLogic("farmCrops", FarmLogicCrops::new);
|
||||
IFarmProperties mushroomFarm = registry.registerLogic("farmShroom", FarmLogicMushroom::new);
|
||||
IFarmProperties succulentFarm = registry.registerLogic("farmSucculentes", FarmLogicSucculent::new);
|
||||
IFarmProperties peatFarm = registry.registerLogic("farmPeat", FarmLogicPeat::new);
|
||||
IFarmProperties infernalFarm = registry.registerLogic("farmInfernal", FarmLogicInfernal::new);
|
||||
IFarmProperties poalesFarm = registry.registerLogic("farmPoales", FarmLogicReeds::new);
|
||||
IFarmProperties orchardFarm = registry.registerLogic("farmOrchard", FarmLogicOrchard::new);
|
||||
IFarmProperties gourdFarm = registry.registerLogic("farmGourd", FarmLogicGourd::new);
|
||||
IFarmProperties cocoaFarm = registry.registerLogic("farmCocoa", FarmLogicCocoa::new);
|
||||
IFarmProperties enderFarm = registry.registerLogic("farmEnder", FarmLogicEnder::new);
|
||||
IFarmProperties arborealFarm = registry.registerLogic(ForestryFarmIdentifier.ARBOREAL, FarmLogicArboreal::new);
|
||||
IFarmProperties cropsFarm = registry.registerLogic(ForestryFarmIdentifier.CROPS, FarmLogicCrops::new);
|
||||
IFarmProperties mushroomFarm = registry.registerLogic(ForestryFarmIdentifier.SHROOM, FarmLogicMushroom::new);
|
||||
IFarmProperties succulentFarm = registry.registerLogic(ForestryFarmIdentifier.SUCCULENTES, FarmLogicSucculent::new);
|
||||
IFarmProperties peatFarm = registry.registerLogic(ForestryFarmIdentifier.PEAT, FarmLogicPeat::new);
|
||||
IFarmProperties infernalFarm = registry.registerLogic(ForestryFarmIdentifier.INFERNAL, FarmLogicInfernal::new);
|
||||
IFarmProperties poalesFarm = registry.registerLogic(ForestryFarmIdentifier.POALES, FarmLogicReeds::new);
|
||||
IFarmProperties orchardFarm = registry.registerLogic(ForestryFarmIdentifier.ORCHARD, FarmLogicOrchard::new);
|
||||
IFarmProperties gourdFarm = registry.registerLogic(ForestryFarmIdentifier.GOURD, FarmLogicGourd::new);
|
||||
IFarmProperties cocoaFarm = registry.registerLogic(ForestryFarmIdentifier.COCOA, FarmLogicCocoa::new);
|
||||
IFarmProperties enderFarm = registry.registerLogic(ForestryFarmIdentifier.ENDER, FarmLogicEnder::new);
|
||||
|
||||
Circuits.farmArborealManaged = new CircuitFarmLogic("managedArboreal", arborealFarm, false);
|
||||
Circuits.farmArborealManual = new CircuitFarmLogic("manualArboreal", arborealFarm, true);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package forestry.farming.logic;
|
||||
|
||||
public class ForestryFarmIdentifier {
|
||||
public static final String CROPS = "farmCrops";
|
||||
public static final String GOURD = "farmGourd";
|
||||
public static final String SHROOM = "farmShroom";
|
||||
public static final String INFERNAL = "farmInfernal";
|
||||
public static final String POALES = "farmPoales";
|
||||
public static final String SUCCULENTES = "farmSucculentes";
|
||||
public static final String ENDER = "farmEnder";
|
||||
public static final String ARBOREAL = "farmArboreal";
|
||||
public static final String PEAT = "farmPeat";
|
||||
public static final String ORCHARD = "farmOrchard";
|
||||
public static final String COCOA = "farmCocoa";
|
||||
public static final String RUBBER = "farmRubber";
|
||||
public static final String ORCHID ="farmOrchid";
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import forestry.core.inventory.IInventoryAdapter;
|
||||
import forestry.core.multiblock.FakeMultiblockController;
|
||||
import forestry.farming.FarmRegistry;
|
||||
import forestry.farming.gui.IFarmLedgerDelegate;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
|
||||
public class FakeFarmController extends FakeMultiblockController implements IFarmControllerInternal {
|
||||
public static final FakeFarmController instance = new FakeFarmController();
|
||||
@@ -87,7 +88,7 @@ public class FakeFarmController extends FakeMultiblockController implements IFar
|
||||
|
||||
@Override
|
||||
public IFarmLogic getFarmLogic(FarmDirection direction) {
|
||||
return FarmRegistry.getInstance().getProperties("farmArboreal").getLogic(false);
|
||||
return FarmRegistry.getInstance().getProperties(ForestryFarmIdentifier.ARBOREAL).getLogic(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,6 +77,7 @@ import forestry.farming.FarmHelper.Stage;
|
||||
import forestry.farming.FarmRegistry;
|
||||
import forestry.farming.FarmTarget;
|
||||
import forestry.farming.gui.IFarmLedgerDelegate;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.tiles.TileFarmGearbox;
|
||||
import forestry.farming.tiles.TileFarmPlain;
|
||||
|
||||
@@ -630,7 +631,7 @@ public class FarmController extends RectangularMultiblockControllerBase implemen
|
||||
|
||||
@Override
|
||||
public void resetFarmLogic(FarmDirection direction) {
|
||||
setFarmLogic(direction, FarmRegistry.getInstance().getProperties("farmArboreal").getLogic(false));
|
||||
setFarmLogic(direction, FarmRegistry.getInstance().getProperties(ForestryFarmIdentifier.ARBOREAL).getLogic(false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@ import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
import forestry.modules.ModuleHelper;
|
||||
@@ -75,7 +76,7 @@ public class PluginActuallyAdditions extends CompatPlugin {
|
||||
Block plantBlock = getBlock(blockName);
|
||||
if (plantBlock != null) {
|
||||
FarmableAgingCrop crop = new FarmableAgingCrop(new ItemStack(seedItem), plantBlock, BlockCrops.AGE, 7, 0);
|
||||
ForestryAPI.farmRegistry.registerFarmables("farmCrops", crop);
|
||||
ForestryAPI.farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, crop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableDoubleCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
|
||||
@@ -38,7 +39,7 @@ public class PluginBetterWithMods extends CompatPlugin {
|
||||
IBlockState mature = defaultState.withProperty(AGE, 7).withProperty(TOP, false);
|
||||
IBlockState topMature = defaultState.withProperty(AGE, 7).withProperty(TOP, true);
|
||||
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableDoubleCrop(hempSeed, planted, mature, topMature, true));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableDoubleCrop(hempSeed, planted, mature, topMature, true));
|
||||
|
||||
RecipeManagers.squeezerManager.addRecipe(10, hempSeed, Fluids.SEED_OIL.getFluid(seedAmount));
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import forestry.core.utils.Log;
|
||||
import forestry.farming.FarmRegistry;
|
||||
import forestry.farming.circuits.CircuitFarmLogic;
|
||||
import forestry.farming.logic.FarmLogicRedOrchid;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
|
||||
@@ -57,9 +58,9 @@ public class PluginExtraUtilities extends CompatPlugin {
|
||||
if (Config.isExUtilRedOrchidEnabled() && redOrchid != null) {
|
||||
Item item = Item.getItemFromBlock(redOrchid);
|
||||
|
||||
registerFarmable(redOrchid, item, "farmOrchid");
|
||||
registerFarmable(redOrchid, item, ForestryFarmIdentifier.ORCHID);
|
||||
|
||||
IFarmProperties orchidFarm = FarmRegistry.getInstance().registerLogic("farmOrchid", FarmLogicRedOrchid::new);
|
||||
IFarmProperties orchidFarm = FarmRegistry.getInstance().registerLogic(ForestryFarmIdentifier.ORCHID, FarmLogicRedOrchid::new);
|
||||
orchidFarm.registerSoil(new ItemStack(Blocks.REDSTONE_ORE), Blocks.REDSTONE_ORE.getDefaultState());
|
||||
orchidFarm.registerSoil(new ItemStack(Blocks.LIT_REDSTONE_ORE), Blocks.LIT_REDSTONE_ORE.getDefaultState());
|
||||
|
||||
@@ -71,7 +72,7 @@ public class PluginExtraUtilities extends CompatPlugin {
|
||||
|
||||
if (Config.isExUtilEnderLilyEnabled() && enderLilly != null) {
|
||||
Item item = Item.getItemFromBlock(enderLilly);
|
||||
registerFarmable(enderLilly, item, "farmEnder");
|
||||
registerFarmable(enderLilly, item, ForestryFarmIdentifier.ENDER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.items.ItemRegistryCore;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
import forestry.modules.ModuleHelper;
|
||||
@@ -199,7 +200,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, berrySeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
if (farmingModuleEnabled && berrySeed != null && berryBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(berrySeed, berryBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(berrySeed, berryBlock, plantAGE, 3, 0));
|
||||
}
|
||||
plants.add(berryName);
|
||||
}
|
||||
@@ -216,7 +217,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, fruitSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
if (farmingModuleEnabled && fruitSeed != null && fruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(fruitSeed, fruitBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(fruitSeed, fruitBlock, plantAGE, 3, 0));
|
||||
}
|
||||
plants.add(fruitName);
|
||||
}
|
||||
@@ -234,7 +235,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, vegetableSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
if (farmingModuleEnabled && vegetableSeed != null && vegetableBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(vegetableSeed, vegetableBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(vegetableSeed, vegetableBlock, plantAGE, 3, 0));
|
||||
}
|
||||
plants.add(vegetableName);
|
||||
}
|
||||
@@ -253,7 +254,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.moistenerManager.addRecipe(grainSeed, new ItemStack(Blocks.MYCELIUM), 5000);
|
||||
}
|
||||
if (farmingModuleEnabled && grainSeed != null && grainBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(grainSeed, grainBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(grainSeed, grainBlock, plantAGE, 3, 0));
|
||||
}
|
||||
plants.add(grainName);
|
||||
}
|
||||
@@ -262,7 +263,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
ItemStack treeFruit = getItemStack(treeFruitName + "item");
|
||||
Block treeFruitBlock = getBlock("pam" + treeFruitName);
|
||||
if (farmingModuleEnabled && treeFruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, treeFruitBlock, fruitAGE, 2, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableAgingCrop(ItemStack.EMPTY, treeFruitBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
if (treeFruit != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, treeFruit, Fluids.JUICE.getFluid(juiceAmount));
|
||||
@@ -273,7 +274,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
for (String treeName : trees) {
|
||||
Block fruitBlock = getBlock("pam" + treeName);
|
||||
if (farmingModuleEnabled && fruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, fruitBlock, fruitAGE, 2, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableAgingCrop(ItemStack.EMPTY, fruitBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
plants.add(treeName);
|
||||
}
|
||||
@@ -281,7 +282,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
for (String treeName : treesSpecial) {
|
||||
Block fruitBlock = getBlock("pam" + treeName);
|
||||
if (farmingModuleEnabled && fruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, fruitBlock, fruitAGE, 2, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableAgingCrop(ItemStack.EMPTY, fruitBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +300,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, genericCropSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
if (farmingModuleEnabled && genericCropSeed != null && genericCropBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(genericCropSeed, genericCropBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(genericCropSeed, genericCropBlock, plantAGE, 3, 0));
|
||||
}
|
||||
plants.add(cropName);
|
||||
}
|
||||
@@ -310,7 +311,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, mustardCropSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
if (farmingModuleEnabled && mustardCropSeed != null && mustardCropBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(mustardCropSeed, mustardCropBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(mustardCropSeed, mustardCropBlock, plantAGE, 3, 0));
|
||||
}
|
||||
if (mustardFruit != null) {
|
||||
RecipeUtil.addFermenterRecipes(mustardFruit, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
@@ -331,7 +332,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, cropnutSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
if (farmingModuleEnabled && cropnutSeed != null && cropnutBlock != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(cropnutSeed, cropnutBlock, plantAGE, 3, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(cropnutSeed, cropnutBlock, plantAGE, 3, 0));
|
||||
}
|
||||
if (cropnut != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(20, cropnut, Fluids.SEED_OIL.getFluid(12 * seedamount));
|
||||
@@ -342,7 +343,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
ItemStack nut = getItemStack(nutName + "item");
|
||||
Block nutBlock = getBlock("pam" + nutName);
|
||||
if (farmingModuleEnabled && nutBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, nutBlock, fruitAGE, 2, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableAgingCrop(ItemStack.EMPTY, nutBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
if (nut != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(20, nut, Fluids.SEED_OIL.getFluid(15 * seedamount));
|
||||
|
||||
@@ -63,6 +63,7 @@ import forestry.energy.circuits.CircuitElectricEfficiency;
|
||||
import forestry.farming.FarmRegistry;
|
||||
import forestry.farming.circuits.CircuitFarmLogic;
|
||||
import forestry.farming.logic.FarmLogicRubber;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableBasicIC2Crop;
|
||||
import forestry.modules.BlankForestryModule;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
@@ -130,7 +131,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
rubber = IC2Items.getItem("crafting", "rubber");
|
||||
fertilizer = IC2Items.getItem("crop_res","fertilizer");
|
||||
|
||||
IFarmProperties rubberFarm = FarmRegistry.getInstance().registerLogic("farmRubber", FarmLogicRubber::new);
|
||||
IFarmProperties rubberFarm = FarmRegistry.getInstance().registerLogic(ForestryFarmIdentifier.RUBBER, FarmLogicRubber::new);
|
||||
|
||||
Circuits.farmRubberManual = new CircuitFarmLogic("manualRubber", rubberFarm, true);
|
||||
|
||||
@@ -302,7 +303,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.RUBBER, 1), Circuits.farmRubberManual);
|
||||
}
|
||||
|
||||
FarmRegistry.getInstance().registerFarmables("farmOrchard", new FarmableBasicIC2Crop());
|
||||
FarmRegistry.getInstance().registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableBasicIC2Crop());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableDoubleCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
|
||||
@@ -53,8 +54,7 @@ public class PluginImmersiveEngineering extends CompatPlugin {
|
||||
IBlockState mature = defaultState.withProperty(age, (Comparable) bottom4.get());
|
||||
IBlockState topMature = defaultState.withProperty(age, (Comparable) top0.get());
|
||||
|
||||
farmRegistry.registerFarmables("farmWheat", new FarmableDoubleCrop(hempSeed, planted, mature, topMature, false));
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableDoubleCrop(hempSeed, planted, mature, topMature, true));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableDoubleCrop(hempSeed, planted, mature, topMature, true));
|
||||
|
||||
RecipeManagers.squeezerManager.addRecipe(10, hempSeed, Fluids.SEED_OIL.getFluid(seedAmount));
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
import forestry.modules.ModuleHelper;
|
||||
@@ -162,7 +163,7 @@ public class PluginMysticalAgriculture extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, seeds, Fluids.SEED_OIL.getFluid(seedAmount));
|
||||
}
|
||||
if (seeds != null && block != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(seeds, block, BlockCrops.AGE, 7, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(seeds, block, BlockCrops.AGE, 7, 0));
|
||||
}
|
||||
}
|
||||
for(int i = 1;i <= 5;i++){
|
||||
@@ -172,7 +173,7 @@ public class PluginMysticalAgriculture extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, seeds, Fluids.SEED_OIL.getFluid(seedAmount));
|
||||
}
|
||||
if (seeds != null && block != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(seeds, block, BlockCrops.AGE, 7, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(seeds, block, BlockCrops.AGE, 7, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.core.utils.Log;
|
||||
import forestry.core.utils.ModUtil;
|
||||
import forestry.farming.FarmRegistry;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.farming.logic.farmables.FarmableSapling;
|
||||
import forestry.farming.logic.farmables.FarmableVanillaMushroom;
|
||||
@@ -127,7 +128,7 @@ public class PluginNatura extends BlankForestryModule {
|
||||
windfall = new ItemStack[]{potashApple};
|
||||
}
|
||||
|
||||
FarmRegistry.getInstance().registerFarmables("farmArboreal", new FarmableSapling(
|
||||
FarmRegistry.getInstance().registerFarmables(ForestryFarmIdentifier.ARBOREAL, new FarmableSapling(
|
||||
new ItemStack(item),
|
||||
windfall
|
||||
));
|
||||
@@ -153,7 +154,7 @@ public class PluginNatura extends BlankForestryModule {
|
||||
// block representing planted glowshroom
|
||||
final Block smallShroomBlock = Block.getBlockFromItem(subItem.getItem());
|
||||
|
||||
FarmRegistry.getInstance().registerFarmables("farmShroom", new FarmableVanillaMushroom(
|
||||
FarmRegistry.getInstance().registerFarmables(ForestryFarmIdentifier.SHROOM, new FarmableVanillaMushroom(
|
||||
subItem,
|
||||
smallShroomBlock.getStateFromMeta(subItem.getMetadata()),
|
||||
largeShroomBlock
|
||||
@@ -291,7 +292,7 @@ public class PluginNatura extends BlankForestryModule {
|
||||
return;
|
||||
}
|
||||
|
||||
FarmRegistry.getInstance().registerFarmables("farmCrops",
|
||||
FarmRegistry.getInstance().registerFarmables(ForestryFarmIdentifier.CROPS,
|
||||
new FarmableAgingCrop(
|
||||
seedItem,
|
||||
block,
|
||||
@@ -342,8 +343,8 @@ public class PluginNatura extends BlankForestryModule {
|
||||
@Override
|
||||
public void postInit() {
|
||||
IFarmRegistry registry = FarmRegistry.getInstance();
|
||||
IFarmProperties mushroomFarm = registry.getProperties("farmShroom");
|
||||
IFarmProperties farmArboreal = registry.getProperties("farmArboreal");
|
||||
IFarmProperties mushroomFarm = registry.getProperties(ForestryFarmIdentifier.SHROOM);
|
||||
IFarmProperties farmArboreal = registry.getProperties(ForestryFarmIdentifier.ARBOREAL);
|
||||
if (farmArboreal != null) {
|
||||
farmArboreal.registerSoil(new ItemStack(Blocks.NETHERRACK), Blocks.NETHERRACK.getDefaultState());
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
|
||||
@@ -57,7 +58,7 @@ public class PluginRoots extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, fruit, Fluids.JUICE.getFluid(juiceAmount));
|
||||
}
|
||||
if (seed != null && block != null) {
|
||||
farmRegistry.registerFarmables("farmCrops", new FarmableAgingCrop(seed, block, BlockCrops.AGE, 7, 0));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.CROPS, new FarmableAgingCrop(seed, block, BlockCrops.AGE, 7, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableAgingCrop;
|
||||
import forestry.farming.logic.farmables.FarmableRusticGrape;
|
||||
import forestry.farming.logic.farmables.FarmableRusticSapling;
|
||||
@@ -50,14 +51,14 @@ public class PluginRustic extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, grapes, Fluids.JUICE.getFluid(juiceAmount / 12));
|
||||
}
|
||||
if (grapeLeaves != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableRusticGrape(grapeLeaves));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableRusticGrape(grapeLeaves));
|
||||
}
|
||||
|
||||
ItemStack sapling = getItemStack("sapling");
|
||||
ItemStack ironBerries = getItemStack("ironberries");
|
||||
ItemStack olives = getItemStack("olives");
|
||||
if (sapling != null && ironBerries != null && olives != null) {
|
||||
farmRegistry.registerFarmables("farmArboreal", new FarmableRusticSapling(sapling.getItem(), new ItemStack[]{ironBerries, olives}));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ARBOREAL, new FarmableRusticSapling(sapling.getItem(), new ItemStack[]{ironBerries, olives}));
|
||||
}
|
||||
|
||||
for (int i = 0; i < fruits.size(); i++) {
|
||||
@@ -72,7 +73,7 @@ public class PluginRustic extends CompatPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, fruit, Fluids.JUICE.getFluid(juiceAmount / 25));
|
||||
}
|
||||
if (seeds != null && block != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(seeds, block, cropAge, 3, 2));
|
||||
farmRegistry.registerFarmables(ForestryFarmIdentifier.ORCHARD, new FarmableAgingCrop(seeds, block, cropAge, 3, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import forestry.core.utils.ModUtil;
|
||||
import forestry.farming.FarmRegistry;
|
||||
import forestry.farming.circuits.CircuitFarmLogic;
|
||||
import forestry.farming.logic.FarmLogicRubber;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableSapling;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
import forestry.modules.ModuleHelper;
|
||||
@@ -61,7 +62,7 @@ public class PluginTechReborn extends CompatPlugin {
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
IFarmProperties rubberFarm = FarmRegistry.getInstance().registerLogic("farmRubber", FarmLogicRubber::new);
|
||||
IFarmProperties rubberFarm = FarmRegistry.getInstance().registerLogic(ForestryFarmIdentifier.RUBBER, FarmLogicRubber::new);
|
||||
|
||||
Circuits.farmRubberManual = new CircuitFarmLogic("manualRubber", rubberFarm, true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user