public interface IFarmListener
| Modifier and Type | Method and Description |
|---|---|
void |
afterCropHarvest(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> harvested,
ICrop crop)
Called after a crop has been harvested, but before harvested items are stowed in the farms inventory.
|
boolean |
beforeCropHarvest(ICrop crop)
Called before a crop is harvested.
|
boolean |
cancelTask(IFarmLogic logic,
FarmDirection direction)
Can be used to cancel farm task on a per side/
IFarmLogic basis. |
void |
hasCollected(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> collected,
IFarmLogic logic)
Called after the stack of collected items has been returned by the farm logic, but before it is added to the farm's pending queue.
|
void |
hasCultivated(IFarmLogic logic,
net.minecraft.util.math.BlockPos pos,
FarmDirection direction,
int extent)
Called after farmland has successfully been cultivated by a farm logic.
|
void |
hasScheduledHarvest(java.util.Collection<ICrop> harvested,
IFarmLogic logic,
net.minecraft.util.math.BlockPos pos,
FarmDirection direction,
int extent)
Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the farm's pending queue.
|
boolean beforeCropHarvest(ICrop crop)
crop - ICrop about to be harvested.void afterCropHarvest(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> harvested,
ICrop crop)
harvested - Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less items!crop - Harvested ICropvoid hasCollected(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> collected,
IFarmLogic logic)
collected - Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items!void hasCultivated(IFarmLogic logic, net.minecraft.util.math.BlockPos pos, FarmDirection direction, int extent)
void hasScheduledHarvest(java.util.Collection<ICrop> harvested, IFarmLogic logic, net.minecraft.util.math.BlockPos pos, FarmDirection direction, int extent)
boolean cancelTask(IFarmLogic logic, FarmDirection direction)
IFarmLogic basis.