Test with stuff + Forestry potential support
This commit is contained in:
parent
5b05cf651b
commit
bd26e441cb
174 changed files with 5602 additions and 0 deletions
68
BM_src/forestry/api/farming/IFarmHousing.java
Normal file
68
BM_src/forestry/api/farming/IFarmHousing.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
package forestry.api.farming;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public interface IFarmHousing {
|
||||
|
||||
int[] getCoords();
|
||||
|
||||
int[] getArea();
|
||||
|
||||
int[] getOffset();
|
||||
|
||||
World getWorld();
|
||||
|
||||
/**
|
||||
* Will run the work cycle on a master TE. Will do nothing on any other farm component.
|
||||
*
|
||||
* @return true if any work was done, false otherwise.
|
||||
*/
|
||||
boolean doWork();
|
||||
|
||||
boolean hasLiquid(FluidStack liquid);
|
||||
|
||||
void removeLiquid(FluidStack liquid);
|
||||
|
||||
boolean hasResources(ItemStack[] resources);
|
||||
|
||||
void removeResources(ItemStack[] resources);
|
||||
|
||||
/**
|
||||
* Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling from the farm's inventory. It's up to the
|
||||
* logic to only call this on a valid location.
|
||||
*
|
||||
* @param farmable
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return true if planting was successful, false otherwise.
|
||||
*/
|
||||
boolean plantGermling(IFarmable farmable, World world, int x, int y, int z);
|
||||
|
||||
/* INTERACTION WITH HATCHES */
|
||||
boolean acceptsAsGermling(ItemStack itemstack);
|
||||
|
||||
boolean acceptsAsResource(ItemStack itemstack);
|
||||
|
||||
boolean acceptsAsFertilizer(ItemStack itemstack);
|
||||
|
||||
/* LOGIC */
|
||||
/**
|
||||
* Set a farm logic for the given direction. UP/DOWN/UNKNOWN are invalid!
|
||||
*
|
||||
* @param direction
|
||||
* @param logic
|
||||
*/
|
||||
void setFarmLogic(ForgeDirection direction, IFarmLogic logic);
|
||||
|
||||
/**
|
||||
* Reset the farm logic for the given direction to default. UP/DOWN/UNKNOWN are invalid!
|
||||
*
|
||||
* @param direction
|
||||
*/
|
||||
void resetFarmLogic(ForgeDirection direction);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue