-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Butterfly API is a developer library for Fabric mods running on Minecraft 1.21.11.
It provides reusable helpers for common modding tasks such as registering content, creating creative tabs, registering client-side features, working with plush blocks, rendering custom outlines, and performing common math operations.
The goal of Butterfly API is to reduce repeated setup code while still allowing mods to use normal Minecraft and Fabric systems.
Butterfly API 1.21.11 requires:
- Minecraft 1.21.11
- Java 21
- Fabric Loader
- Fabric API
- Butterfly API
Butterfly API provides shortcuts for registering common Minecraft content including:
- Items
- Blocks
- Block items
- Sounds
- Entities
- Block entities
- Screen handlers
- Status effects
- Potions
- Recipe serializers
- Recipe types
- Particles
Most registration helpers are available through ModContext.
See Registration.
ModContext provides a central helper object for your mod.
It handles commonly repeated tasks such as:
- Creating namespaced identifiers
- Creating registry keys
- Creating item and block settings
- Accessing registration helpers
- Accessing creative tab helpers
- Accessing client registration helpers
- Accessing your mod logger
See Mod Context.
Butterfly API includes an expanded creative tab system that can create both simple tabs and more customized tabs.
Custom tabs can include:
- Categories
- Category ordering
- Custom colors
- Custom backgrounds
- Custom slot styling
- Search-only entries
See Creative Tabs.
The Plush API provides a reusable system for registering interactive plush blocks.
A registered plush can include:
- A block
- A matching item
- A plush block entity
- Custom interaction behavior
- Custom sounds
- Squishing behavior
- Custom resource files
See Plush API.
Butterfly API can render customizable outlines around entities and block entities.
Outlines can be controlled from either the server or the local client and support settings such as:
- Color
- Thickness
- Inside, outside, or centered placement
- Visibility through walls
- Black borders
- Model-layer matching
- Distance-consistent thickness
See Outline API.
Butterfly API contains several small utility classes for frequently used calculations.
These include helpers for:
- Angles
- Vectors
- Bounding boxes
- Motion
- Sampling points
- Scalar values
See Math Utilities.
Client-only helpers are available for registering features such as:
- Block render layers
- Entity renderers
- Block entity renderers
- Screens
- Model layers
- Particle factories
See Client Registration.
Bootstrap and RunOnce provide simple ways to make initialization code run only once.
See Bootstrap Helpers.
If you are adding Butterfly API to a mod for the first time, start with:
After that, use the sidebar to find the specific API feature you need.
This documentation is for Butterfly API on Minecraft 1.21.11.