Skip to content
Moth edited this page Aug 9, 2026 · 2 revisions

Butterfly API

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 registration, blocks, items, creative tabs, plush blocks, custom outlines, client registration, math, and initialization.

The goal of Butterfly API is to reduce repeated setup code while still working with normal Minecraft and Fabric systems.

Main Features

Mod Context

ModContext is the central helper used throughout Butterfly API.

It provides:

  • Namespaced identifiers
  • Block and item registry keys
  • Keyed block and item settings
  • Registration helpers
  • Creative tab helpers
  • Client registration helpers
  • Logging

See Mod Context.

Registration

Butterfly API provides shortcuts for registering common content, including:

  • Items
  • Blocks
  • Sounds
  • Entities
  • Block entities
  • Screen handlers
  • Status effects
  • Potions
  • Recipe serializers
  • Recipe types
  • Particles

Enchantments and painting variants are data-driven in Minecraft 1.21.11.

See Registration.

Items

Butterfly API includes helpers for several item-related systems that are awkward to handle manually in Minecraft 1.21.11.

These include:

  • Displayed attack speed modifiers
  • Separate GUI and held item models
  • Custom item progress bars
  • Multi-row progress bars
  • Layered progress bars

See Items.

Blocks and Multiblocks

Butterfly API provides a block builder for blocks that need custom settings or block items.

It also includes a multiblock system with:

  • Built-in multiblock shapes
  • Automatic part placement
  • Horizontal facing
  • Part coordinates
  • Automatic cleanup when structures are broken
  • Protection against duplicate drops
  • Lower-level placement helpers for custom implementations

See Blocks and Multiblocks.

Creative Tabs

Butterfly API can create both simple creative tabs and styled categorized tabs.

Custom tabs can include:

  • Categories
  • Category ordering
  • Custom backgrounds
  • Slot colors
  • Category colors
  • Text colors
  • Search-only entries

See Creative Tabs.

Plush API

Butterfly plushes are reusable vanilla block-model plush blocks.

They support:

  • A placed block
  • A matching block item
  • A shared plush block entity type
  • Honk sounds
  • Squish state
  • Custom interaction behavior
  • Normal block-model lighting
  • Cutout textures

See Plush API.

Outline API

Butterfly API can render customizable outlines around entities and block entities.

Outlines support features such as:

  • Custom RGB colors
  • Adjustable thickness
  • Inside, outside, or centered placement
  • Visibility through walls
  • Optional black borders
  • Model-layer matching
  • Distance-consistent thickness
  • Server-synced outlines
  • Viewer-specific outlines
  • Client-only outlines

See Outline API.

Client Registration

Butterfly API provides shortcuts for registering common client-side features such as:

  • Block render layers
  • Entity renderers
  • Block entity renderers
  • Screens
  • Model layers
  • Particle factories

See Client Registration.

Math Utilities

Butterfly API contains reusable helpers for:

  • Angles
  • Vectors
  • Bounding boxes
  • Motion
  • Sampling
  • Scalar values

See Math Utilities.

Bootstrap Helpers

Bootstrap and RunOnce help prevent initialization code from accidentally running more than once.

See Bootstrap Helpers.

Getting Started

If you are using Butterfly API for the first time, start with:

  1. Installation
  2. Quick Start
  3. Mod Context
  4. Registration

After that, use the sidebar to find the specific system you need.


This wiki documents Butterfly API for Minecraft 1.21.11.

Clone this wiki locally