Class TriggerVolumeRuleSystems.NoHarvestUse

All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>
Enclosing class:
TriggerVolumeRuleSystems

public static final class TriggerVolumeRuleSystems.NoHarvestUse extends EntityEventSystem<EntityStore, UseBlockEvent.Pre>
Cancels the interaction-based harvest of a farmable crop when a NoHarvest rule covers it. Regrowing ("eternal") crops are gathered by using the block (which regrows it) rather than breaking it, so they never fire a break event; the break-based harvest is handled by TriggerVolumeRuleSystems.NoDestroyBlockBreak. Mirrors TriggerVolumeRuleSystems.NoDoorOpen by vetoing the cancellable UseBlockEvent.Pre.