Skip to content

About

Banners on Horses, Boats, Happy Ghasts, as Capes, Hats and more!

Resources

Stars

7 stars

Watchers

2 watching

Forks

Repository files navigation

Modrinth Modrinth

Downloads Versions  

 

Features

  • Banners on Entities: Happy Ghast, Boat, Horse, Mule, Donkey, Strider, Villager
  • Players can equip Banners as: Cape, Hat (Support for Slot Mods)
  • Combine chestplates and helmets with Banners to equip both
  • Banner Threads item (combine with a banner to increase the max layer limit)

Beta Features (Must be enabled in config)

  • Minecart Banners

Compatibilities

  • Trinkets / Trinkets Canary / Trinkets Continued / Trinkets Updated
  • Accessories
  • Curios (banners go in the back and head slots)
  • WaveyCapes

Features (before v2.0)

  • Equip Banners as Capes (Cape Slot if Trinkets installed)
  • Put Banners on Horses, Donkeys, Mules and Llamas with a new inventory slot
  • Put Banners with right-click on Pigs, Striders, Boats & Villagers
  • Remove Banners from Pigs, Striders, Boats & Villagers with Shears
  • Hang Banners below blocks
  • Fix banner position in fox mouth
  • Fix enchanting glint on enchanted banners
  • Config menu accessible through ModMenu

Compatibilities (before v2.0)

Incompatibilities (before v2.0)


Building

One branch builds every Minecraft version and mod loader with Stonecutter. Each version and loader pair is a node under versions/<version>-<loader>, built by build.<loader>.gradle.kts.

./gradlew buildAndCollect

builds every node and copies the jars to build/libs/<mod version>/. One node alone: ./gradlew :26.3-neoforge:build.

The sources are written for the active node (stonecutter active in stonecutter.gradle.kts, kept on the newest Fabric node). Code for other versions or loaders sits in //? if comments that Stonecutter swaps in when it builds that node:

  • A Minecraft call that only changed its name or arguments gets an //? if >=26.3 { ... } else { ... } right where it is called.
  • Anything that differs between loaders goes through platform/Platform or a loader's entrypoint in the fabric, neoforge and forge packages, never inline in feature code.
  • A class Mojang only renamed or moved is mapped once in the replacements block of stonecutter.gradle.kts, and the sources keep the newest name.

The oldest version is 1.18.2. Banner rendering comes in three generations, each in //? if blocks next to the newest code:

  • From 1.21.9, layers submit to a SubmitNodeCollector.
  • Before 1.21.9, they render into a MultiBufferSource. A Stonecutter replacement swaps the type, so only the drawing calls differ.
  • Before 1.21.2 there are no render states, so the layers read the entity directly. Banner models only became classes in 1.21.4, so the legacy package has stand-ins for older versions.

Everything MBF stores on items goes through utils/BannerItems: data components from 1.20.5, NBT in vanilla's own layout before that, with legacy/BannerPatternLayers standing in for the pattern component.

A mixin whose target class only exists on some versions is added by MixinPlugin instead of the mixin JSON, which Stonecutter can't version.

Forge up to 1.20.1 runs on SRG names, so those nodes use build.legacyforge.gradle.kts (ModDevGradle's legacy plugin), which reobfuscates the jar and writes the mixin refmap. Forge 1.20.2 to 1.20.4 has no toolchain that runs on this Gradle version, so 1.20.4 ships for Fabric and NeoForge only. NeoForge 1.20.1 loads the Forge jar.

Adding the next Minecraft version

  1. In settings.gradle.kts, add mc("<version>", "fabric", "neoforge", "forge") above the current newest line, with only the loaders that have a release for it.
  2. In stonecutter.properties.toml, add a ["<version>"] block and one [<loader>."<version>"] block per loader with its dependency versions. Copy the newest blocks and bump the numbers. Forge needs mod.pack_format from the Forge MDK's pack.mcmeta.
  3. Set vcsVersion in settings.gradle.kts to <version>-fabric and run ./gradlew "Set active project to <version>-fabric", which rewrites the sources and stonecutter.gradle.kts for the new node. Fix the compile errors on the new version; every fix that breaks an older node gets an //? if with the old code in the else branch.
  4. Run ./gradlew buildAndCollect and make sure every node still builds.

About

Banners on Horses, Boats, Happy Ghasts, as Capes, Hats and more!

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages