Quark exposes a stable public Java API atDocumentation 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.
org.violetmoon.quark.api.* that lets your mod integrate with Quark features — inventory sorting, piston callbacks, magnet behavior, Matrix Enchanting, the Trowel, the Usage Ticker, and more — without requiring Quark to be installed. This page explains how to declare the dependency and points you to each area of the API.
Adding Quark as a Soft Dependency
Declare Quark as an optional dependency in yourneoforge.mods.toml. Using mandatory = false means your mod loads even when Quark is absent; you are responsible for guarding any Quark calls with a runtime presence check.
neoforge.mods.toml
yourmod with your own mod ID.
Runtime Presence Check
Because Quark is optional, wrap any direct Quark logic in a mod-presence check to avoidClassNotFoundException on servers or clients without Quark:
Importing the API Package
All public types live inorg.violetmoon.quark.api and its event sub-package:
The Quark team recommends bundling the API classes with your mod rather than assuming Quark is present. When you copy the sources, include
package-info.java from the API package. The canonical source is src/main/java/org/violetmoon/quark/api/ on GitHub.What the API Provides
API Interfaces
Implement on your Block, Item, Entity, Screen, or BlockEntity to hook into Quark features like sorting, magnet behavior, enchanting, and more.
Events
NeoForge bus events fired by Quark — module lifecycle, simple harvest, usage ticker, and tool class gathering.
Capabilities
NeoForge
ItemCapability constants for providing custom sorting logic from your Item implementations.Tags
Data-driven item and block tags consumed by Quark features that you can populate from your mod’s data pack.