Skip to content

Misc Helpers

MehVahdJukaar edited this page Jul 25, 2026 · 1 revision

Misc Helpers

The grab bag. Small utilities that don't deserve a page but save you writing them again.

Math

MthUtils for the vector and angle math vanilla keeps making you rewrite. Range (a min/max pair, also a config type), Rect2D, Vec2i, Direction2D, EntityAngles, CircularGridUtils.

Collections

Class
MapRegistry / CodecMapRegistry Small id keyed registries for things that don't need a real one
SearchTrie / ResourceLocationSearchTrie / PathSearchTrie Prefix search, used by the config screen search and the fast resource cache
CircularList, RollingBuffer, FrequencyOrderedCollection, DefaultMap, WeakHashSet
SidedInstance One instance per logical side, so client and server state don't mix

Files and misc

FilesHelper, ArchiveUtils (zips), FileDownloadUtils, FastCachedWriter, OsType.

Utils has the common one liners: getID(block), item and stack helpers, sound and particle shorthands.

ConcurrentStopwatch and IProgressTracker for timing and reporting long operations, which the resource generation uses.

Odds and ends worth knowing

Registrator<T> is the generic "register this" callback used across the API.

DataObjectReference is a lazy reference to a datapack registry entry, resolved on access.

SimpleMixinPlugin is a base mixin plugin that reads OptionalMixin annotations, so a mixin that targets an optional mod is simply skipped when it isn't there.

FabricOverride and ForgeOverride mark methods that only exist on one loader, so the compiler doesn't complain in common code.

Clone this wiki locally