Quark fires several NeoForge bus events that your mod can listen to. All events extendDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/VazkiiMods/Quark/llms.txt
Use this file to discover all available pages before exploring further.
net.neoforged.bus.api.Event and are posted on the NeoForge event bus (MinecraftForge.EVENT_BUS / NeoForge.EVENT_BUS) unless otherwise noted. Subscribe with @SubscribeEvent on a method in a class registered via @Mod.EventBusSubscriber.
Module events (
ModuleLoadedEvent, ModuleStateChangedEvent) are posted on the mod event bus, not the game event bus.ModuleLoadedEvent
Fired when Quark’s module loader loads a module. This fires before the module’s configuration is resolved, so config values may not be final yet. Bus: Mod event busCancellable: Yes (cancelling prevents the module from loading)
QuarkModuleEvent):
| Field | Type | Description |
|---|---|---|
eventName | String | The module’s event/registration name |
ModuleStateChangedEvent
Fired when a module’s enabled/disabled state changes (e.g. via the Q menu at runtime). Cancel the event to force the module disabled regardless of the user’s setting. Bus: Mod event busCancellable: Yes (cancelling forces the module disabled)
| Field | Type | Description |
|---|---|---|
eventName | String | The module’s event/registration name |
enabled | boolean | The new state the module is transitioning to |
GatherToolClassesEvent
Fired to gather tool classes for anItemStack. Listen to this event to add your item to Quark’s tool-class system (used by features like Hoe Harvesting).
Bus: NeoForge game event busCancellable: No
| Field | Type | Description |
|---|---|---|
stack | ItemStack | The item stack being queried |
classes | Set<String> | Mutable set of tool class strings; add to this set to register your tool |
SimpleHarvestEvent
Fired by the Simple Harvest module when a player (or villager) right-clicks a crop block. Use this event to support double-height crops or to override the harvest target position. Only fires for blocks not on the#quark:simple_harvest_blacklisted tag.
Bus: NeoForge game event busCancellable: Yes (cancel to suppress harvest entirely; sets action to
NONE)
| Field | Type | Description |
|---|---|---|
blockState | BlockState | The block state of the crop |
pos | BlockPos | The position of the crop |
level | Level | The world |
hand | InteractionHand | The hand used (null for villagers) |
entity | Entity | The player or villager harvesting |
| Method | Description |
|---|---|
setTargetPos(BlockPos) | Redirect the harvest to a different position (useful for double-height crops like sugar cane) |
getAction() / setAction(ActionType) | Read or override the harvest action type |
UsageTickerEvent
Fired by the Usage Ticker module to determine which item and count to display in the HUD ticker. Two sub-events are posted:GetStack (to override the displayed item) and GetCount (to override the displayed count).
Bus: NeoForge game event busCancellable: Yes
Base fields (all sub-events)
| Field | Type | Description |
|---|---|---|
slot | EquipmentSlot | The slot being tracked |
currentStack | ItemStack | The logical stack being counted |
currentRealStack | ItemStack | The stack actually held/equipped |
currentCount | int | The current count before this event |
pass | Pass | LOGICAL or RENDERING |
player | Player | The player |
UsageTickerEvent.GetStack
OverrideresultStack to change which item is shown in the ticker.
UsageTickerEvent.GetCount
OverrideresultCount to change the number shown in the ticker.