Search in sources :

Example 1 with FarmLogicRedOrchid

use of forestry.farming.logic.FarmLogicRedOrchid in project ForestryMC by ForestryMC.

the class PluginExtraUtilities method doInit.

@Override
public void doInit() {
    Block redOrchid = getBlock("redorchid");
    Block enderLilly = getBlock("enderlilly");
    if (Config.isExUtilRedOrchidEnabled() && redOrchid != null) {
        Item item = Item.getItemFromBlock(redOrchid);
        registerFarmable(redOrchid, item, "farmOrchid");
        IFarmProperties orchidFarm = FarmRegistry.getInstance().registerLogic("farmOrchid", 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());
        Circuits.farmOrchidManaged = new CircuitFarmLogic("managedOrchid", orchidFarm, false);
        Circuits.farmOrchidManual = new CircuitFarmLogic("manualOrchid", orchidFarm, true);
        orchidStack = new ItemStack(item);
    }
    if (Config.isExUtilEnderLilyEnabled() && enderLilly != null) {
        Item item = Item.getItemFromBlock(enderLilly);
        registerFarmable(enderLilly, item, "farmEnder");
    }
}
Also used : FarmLogicRedOrchid(forestry.farming.logic.FarmLogicRedOrchid) Item(net.minecraft.item.Item) IFarmProperties(forestry.api.farming.IFarmProperties) Block(net.minecraft.block.Block) ItemStack(net.minecraft.item.ItemStack) CircuitFarmLogic(forestry.farming.circuits.CircuitFarmLogic)

Aggregations

IFarmProperties (forestry.api.farming.IFarmProperties)1 CircuitFarmLogic (forestry.farming.circuits.CircuitFarmLogic)1 FarmLogicRedOrchid (forestry.farming.logic.FarmLogicRedOrchid)1 Block (net.minecraft.block.Block)1 Item (net.minecraft.item.Item)1 ItemStack (net.minecraft.item.ItemStack)1