Skip to content

Repository files navigation

Shared core library for the def9a2a4 plugin family - a data-driven custom-block engine plus demo content. On its own it only ships the engine and some command-only demo items; other plugins build their features on top of it. See https://def9a2a4.github.io/defCoreLib-docs/

Download on Modrinth

What it provides

  • Custom-block engine - YAML-driven player-head blocks with states, redstone behavior, particles, light, storage, and animated display entities. In particular, the use of custom heads and display entities allows cool visuals without any mods or resource packs!
  • Custom items & heads, recipe registration, and persistence (chunk scan + self-healing) that companion plugins reuse instead of reimplementing.
  • Mechanism engine - turns groups of blocks into moving display entities + colliders: glue-based doors/drawbridges and mechanical minecarts.
  • Recipe gating - companion plugins switch their content's recipes on by namespace, so installing one adds a coherent, craftable feature set.
  • ~20 command-only demo blocks (candles, redstone/binary displays, storage barrels, alarms, spinning/pulsing decorations) - grab them with /defcorelib give. Not meant to be useful, just there for testing the functionality.

Used by

DefCoreLib is a dependency other plugins install alongside:

Gallery

Plugin Preview
VerticalSlabs
BetterBanners
Mechanism
RedstoneDisplays
Pipes

Commands

Permission corelib.admin.

Command Description
/defcorelib give <id> [n] Give a custom item (namespace:id or shorthand; give glue -> glue brush)
/defcorelib list List all registered block ids
/defcorelib colliders Toggle mechanism collider glow visualization
/defcorelib cleanorphans [confirm] Find (and, with confirm, remove) orphaned display entities

Requires

Nothing - this is the base plugin.

Links

Requirements

  • Java 21
  • Paper 1.21.8 (api-version: 1.21)

Build

./gradlew shadowJar

Produces an uber-JAR in build/libs/. Drop it into your server's plugins/ directory.

Usage from another plugin

  1. Add the DefCoreLib JAR as a compileOnly dependency.
  2. Declare softdepend: [DefCoreLib] in your plugin.yml.
  3. Access registries via CoreLibPlugin.getInstance().

Admin commands: /defcorelib <give|give_demo|list|colliders|reloadbanners|cleanorphans> (permission corelib.admin).

Block definitions

Blocks and mechanisms are declared in YAML under src/main/resources/ (e.g. demo-blocks.yml, rotation-blocks.yml, slabs.yml). See docs/ for the generated block catalog.

About

core library with shared functionality

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages