Welcome to Fzzy Core! This is the base API that powers some kotlin mods made by fzzyhmstrs (that's me!). Besides offering some basic utility functions that come in handy for many different types of mods, Fzzy Core includes the basic framework of the Modifier System, a flexible and powerful system for modifying... almost anything!
Fzzy Core has KDoc integrated into the source for guidance on use. I'm also working on creating a wiki!
Fzzy Core is currently for Fabric. No port to Forge is planned at this time.
Fzzy Core is part of my project to split Amethyst Core into more functional component parts. This mod is the base of those parts, other APIs in my catalog build upon this base (like Amethyst Core for magic mods)
Coding Utils
Fzzy core contains several utilities that make coding mods just a bit easier! These utilities include:
- A base Enchantment Class that can be easily integrated with a configuration system to disable/enable individual enchantments.
- A wrapper for Text that avoids headaches involved with multi-version mods and having to constantly battle merge conflicts on Text changes
- A persistent effect system that allows for creation of delayed, repeating (or non-repeating) events that aren't tied to a specific objects tick or other messy implementation.
- A particle creation system that allows for placing client-side particles at a certain spot in a players POV. This allows for items with particles dripping off them, a torch that emits smoke, etc.
Synced Configuration System
Create an easy-to-manage config system that allows for version control over time, and automatically syncs server configs to joining clients!
- Takes advantage of some of Kotlin's unique functionality for a simple and clean looking implementation
- Helper methods for automatic updating of config files to new versions, capturing the information from the old version before replacing it with the update.
- Simple implementation of auto-syncing functions.
Custom Flavor Items
Add basic or tool items with flavortext!
- Default implementation is simply some new lines in the lang file
- Optional methods for more complex text
- Also adds description text, for explaining what flavortext means, or for describing item functionality
Mana Items
Adds a simple framework for creating items that use mana instead of being damaged in the typical way.
Modifier Framework
The Modifier Framework is a flexible and extensible system designed as a parallel to the vanilla Enchanting system. Modifiers aim to solve two of the biggest problems I found with Enchanting: They are easily removable, and they do not internalize their functionality (besides a couple damage methods). Enchantments are also more boring than they could be, displaying their tier with a simple number. Modifiers aim to fix all of those issues!
- Modifiers are designed to be permanent, acting more like affixes. Grindstones can't remove them, for example.
- Modifiers are designed to internalize their functionality, and can be called as one unit rather than piecemeal.
- Modifiers act via a "family tree" that allow for flavorful tiers. Think of a sword going from "Rusty" to "Shiny" to "Gleaming" etc.
The library comes with builtin helper method for displaying modifiers An example tooltip demonstrating modifiers in gold text
See the wiki link above for more details on these features. Once implemented, a Modifier system can do just about anything. Amethyst Core, for example, has a built-in AugmentModifier that does things from affecting mana cost and cooldown, to changing spell damage or range, to triggering advanced effects like afflicting every mob in a 12 block radius around the caster with Wither upon any successful spell cast.
Modifers can be as simple as a container for passing vanilla AttributeModifiers, or much more complex than the AugmentModifier described above. They could even be used purely for flavor if desired!
Nbt Util
Fzzy Core includes a simple util for performing some useful actions on NBT
- read and write BlockPos with a single helper method, instead of manually saving X, Y, Z coords or doing Long conversion
- Several NbtList utilities for reading from, adding to, and removing from NbtLists
- An ItemStackId system for attaching a unique identifier to certain itemstacks. This allows, for example, an ItemStack keyed to a specific block entity... or much more!
- A helper method for transferring non-enchantment NBT from one stack to another.
Raycaster Util
A simple set of helper methods for locating objects
- Server-sided raycasting for detection of game objects without needing to do fancy networking
- Helper methods for entities, blocks, and locating things in areas around a point (like a player)
- Ability to check for entities with arbitrarily rotated cuboids. Minecraft's default detection systems all use boxes aligned to the XYZ grid. This is useful for something like checking what enemies a spell hits, even if the player is looking diagonally and up a hill.
Event Registry
Registry for adding and tracking basic ticking objects not related to specific objects like entities.
- Useful for creating periodic clocks that only fire every X ticks, allowing for creation of tick methods that don't fire every single tick. In fact, the registry comes with a 1 second, 1.5 second, and 2 second interval clock built in.
- Adds a TickUppable interface and Ticker class for registration of objects to the registry.
Item Model Registry
Want to make a custom trident but can't figure out how in heck to make the in-hand Trident appear like MC's does? This registry is for you!
- Register custom item models for specific render modes (in hand, on ground, etc)
- Integrates with the standard Fabric BuiltinItemRendererRegistry.DynamicItemRenderer
EffectQueue
Hate how adding passive status effects sometimes results in statuses "fighting" in the GUI, with statuses rapidly swapping back and forth?
- This simple utility unifies the additions of all status effects passed into it into a predictable order
- Uses all the standard status effect information you expect with addStatusEffect
Trinket Utils
Fzzy Core integrates optionally with Trinkets, adding some utility functions that can be used with them
- getTrinketStacks provides a list of all Tirnkets equipped to the passed living entity
- the AugmentTasks interface allows for creation of Trinkets that interact with special enchantments call Augments. These augments allow for trinkets with customizable passive and active abilities.
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+