public class DefaultFarmListener extends java.lang.Object implements IFarmListener
| Constructor and Description |
|---|
DefaultFarmListener() |
| 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.
|
public boolean beforeCropHarvest(ICrop crop)
IFarmListenerbeforeCropHarvest in interface IFarmListenercrop - ICrop about to be harvested.public void afterCropHarvest(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> harvested,
ICrop crop)
IFarmListenerafterCropHarvest in interface IFarmListenerharvested - Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less items!crop - Harvested ICroppublic void hasCollected(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> collected,
IFarmLogic logic)
IFarmListenerhasCollected in interface IFarmListenercollected - Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items!public void hasCultivated(IFarmLogic logic, net.minecraft.util.math.BlockPos pos, FarmDirection direction, int extent)
IFarmListenerhasCultivated in interface IFarmListenerpublic void hasScheduledHarvest(java.util.Collection<ICrop> harvested, IFarmLogic logic, net.minecraft.util.math.BlockPos pos, FarmDirection direction, int extent)
IFarmListenerhasScheduledHarvest in interface IFarmListenerpublic boolean cancelTask(IFarmLogic logic, FarmDirection direction)
IFarmListenerIFarmLogic basis.cancelTask in interface IFarmListener