Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

[Let's Do] Foundation

Foundation holds the things every Let's Do mod needs but no single mod should own: HUD panels, tooltips, seats, storage shelves, food with effects, particles, banners and a handful of helpers.


What's inside

Area Package What it gives you Guide
HUD panels overlay "Look at a block, see what to do" panels Guide
Creative tabs client.creative Categories as side tabs on the left of your creative tab Guide
Armor armor, client.armor Textured and dyeable armor items, custom 3D armor models, armor sets with set tooltips Guide
Model templates assets/foundation/models Shared parent models for cabinets, drawers, tables and wall decorations Guide
Tooltips tooltip "Can be placed" + [SHIFT] details, coloured tooltip borders Guide
Rarity rarity Custom item rarities: solid, gradient and animated name colors with a label line Guide
Particles particle, registry Soup, steam, water, dye splash, feather, firefly, drifting leaves/fluff Guide
Ambience ambient Fireflies around lanterns at night Guide
Seats seat, block Chairs, benches, anything you can sit on Guide
Storage storage Shelves / racks that show their items, ready-made wall shelf Guide
Compostables compostable Compostable items on Fabric and NeoForge Guide
Villager trades trade Sell and buy trades for emeralds Guide
Zombie equipment entity.equipment Items for spawning zombies, without your own mixin Guide
Food food Food & drinks with effects, placeable dishes and drinks, ingredient effects Guide
Blocks block Facing, line-connecting, stackable, cake, berry bush, sink, wardrobe, dresser, window, shutter … Guide
Woods wood, client.wood Signs, hanging signs, boats and chest boats for custom wood types Guide
Menus menu Filtered slots, result slots with XP Guide
Mimic blocks block.mimic, client.mimic Blocks that take on the texture of an applied block or show a stored block Guide
Mob AI entity.ai Attack goal that waits for the animation, random idle actions Guide
Banner banner The Completionist Banner every mod gets Guide
Recipes recipe, compat Recipe unlock book, REI/JEI layout helpers Guide
Utilities util, render, text, advancement Registration, shapes, dyeing, item rendering, triggers … Guide

Coming from Farm & Charm's old helpers? See the migration table.


Add Foundation to a mod

1. Publish Foundation locally (once per Foundation change):

./gradlew publishToMavenLocal

2. gradle.properties

foundation_version=1.0.1

3. Root build.gradle – inside allprojects { repositories { … } }:

mavenLocal()

4. Dependencies – include(...) embeds Foundation into your jar:

// common/build.gradle
modCompileOnlyApi("net.satisfy.foundation:foundation-common:${rootProject.foundation_version}") { transitive = false }

// fabric/build.gradle
include(modImplementation("net.satisfy.foundation:foundation-fabric:${rootProject.foundation_version}") { transitive = false })

// neoforge/build.gradle
include(modImplementation("net.satisfy.foundation:foundation-neoforge:${rootProject.foundation_version}") { transitive = false })

5. Declare the dependency

// fabric.mod.json → "depends"
"foundation": ">=1.0.0"
# neoforge.mods.toml
[[dependencies.your_mod_id]]
modId = "foundation"
type = "required"
versionRange = "[1.0.0,)"
ordering = "AFTER"
side = "BOTH"

That's it. Foundation initialises itself – you only register your content with it.


Quick start

// client init of your mod
BlockInfoOverlay.registerProvider(new MyInfoProvider());          // HUD panel for your blocks
InfoTooltip.of(MY_SHELF.get()).placeable().details(2).register(); // tooltip with [SHIFT] details
FireflyAmbience.init(MyConfig::fireflies);                        // fireflies, switchable by your config
// a chair
public class StoolBlock extends ChairBlock {
    public StoolBlock(Properties properties) {
        super(properties);
    }
}

Rules of thumb

Something belongs in Foundation when all of these are true:

  1. At least two Let's Do mods would use it unchanged.
  2. It has no content of its own – no items, blocks or recipes that players see.
  3. It does not read any mod's config. Mods pass switches in (see FireflyAmbience.init, InfoTooltip.when).

Everything else stays in the mod. When in doubt, keep it in the mod and move it later.

Project layout

  • common – all shared code and resources
  • fabric / neoforge – loader entrypoints only

Versioning

Foundation follows semantic versioning. Mods declare a minimum version; because every mod embeds its own copy, the loader picks the newest one. Never remove or rename public API in a minor version.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages