Get things compiling.

Move ForestryAPI into the Forestry project instead of as a submodule
Include the new RF API
Remove code for mods that have not yet ported to 1.8.9 (add it back later)
Bump version to 5.0.0
This commit is contained in:
mezz committed 2016-02-20 19:51:49 -08:00
1 parent 73812d8765
commit 8da0c0dc95
325 files changed
+9600 -4026

No files matched your search

@@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.farming;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
/**
* IFarmable describes a crop or other harvestable object and can be used to inspect item stacks and blocks for matches.
*/
public interface IFarmable {
/**
* @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
*/
boolean isSaplingAt(World world, BlockPos pos);
/**
* @return {@link ICrop} if the block at the given location is a harvestable and mature crop, null otherwise.
*/
ICrop getCropAt(World world, BlockPos pos);
/**
* @return true if the item is a valid germling (plantable sapling, seed, etc.) for this type.
*/
boolean isGermling(ItemStack itemstack);
/**
* @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.)
*/
boolean isWindfall(ItemStack itemstack);
/**
* Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as valid. Called by the {@link IFarmHousing}
* which handles resources.
*
* @return true on success, false otherwise.
*/
boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, BlockPos pos);
}