Contents
Class TriggerVolumeRuleSystems.NoHarvestUse
java.lang.Object
com.hypixel.hytale.component.system.EventSystem<UseBlockEvent.Pre>
com.hypixel.hytale.component.system.EntityEventSystem<EntityStore, UseBlockEvent.Pre>
com.hypixel.hytale.builtin.triggervolumes.system.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.-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionNoHarvestUse(ResourceType<EntityStore, TriggerVolumeManager> managerResourceType) -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()voidhandle(int index, ArchetypeChunk<EntityStore> archetypeChunk, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer, UseBlockEvent.Pre event) An overrideable method called to handle an event for a specific archetype chunk.Methods inherited from class EntityEventSystem
handleInternalMethods inherited from class EventSystem
getEventTypeMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface QuerySystem
getHierarchyScope, test
-
Constructor Details
-
NoHarvestUse
-
-
Method Details
-
handle
public void handle(int index, @Nonnull ArchetypeChunk<EntityStore> archetypeChunk, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull UseBlockEvent.Pre event) Description copied from class:EntityEventSystemAn overrideable method called to handle an event for a specific archetype chunk.- Specified by:
handlein classEntityEventSystem<EntityStore, UseBlockEvent.Pre>- Parameters:
index- The index of the archetype chunk being processed.archetypeChunk- The archetype chunk being processed.store- The ECS store.commandBuffer- The command buffer for queuing ECS commands.event- The event to be handled.
-
getQuery
-