Skip to content

Repository files navigation

BentosLib

Shared building blocks for Bento's Minecraft mods. Forge 1.20.1.

This is a library, not a content mod. On its own it adds nothing to the game: no items, no entities, no worldgen. It registers no content, opens no network channel and subscribes to no gameplay events. Everything in here is switched on explicitly by the mod that depends on it.

The one exception is the curio activation keybind, which registers itself on the client, because a KeyMapping has to exist before any tooltip can name it.

What you need

  • Forge 47.4.9, Minecraft 1.20.1, Java 17
  • Curios API 5.14.1+1.20.1 — required, the curio activation framework depends on it

Depending on it

Publish it to your local Maven, then pull it from there:

./gradlew publishToMavenLocal

In your build.gradle:

repositories {
    mavenLocal()
}

dependencies {
    implementation fg.deobf('net.randomcara.bentoslib:bentoslib:0.1-1.20.1')
}

And in your mods.toml:

[[dependencies.yourmod]]
modId="bentoslib"
mandatory=true
versionRange="[0.1,)"
ordering="BEFORE"
side="BOTH"

What's in it

CuriosIActivatableCurioItem is the whole contract for an item that answers the activation key. ActivateCurioItemPacket.register(channel, id) wires it to your own SimpleChannel. CurioActivationHelper looks up equipped curios.

ClientTooltipHelper for shift-to-expand descriptions, ActivatableArtifactTooltipHelper for the activation line, BannerBackLayer for rendering a banner on a mob's back, and AreaVisualClient for the ground-marker effect an activated item can throw down.

GameplayEventBossBarController keeps boss bars for temporary events addressed by id. ChestLootInjector adds a pool to existing loot tables, ChanceDropLootModifier is a base for chance-based entity drops, and EntityDropReplacer swaps another mod's drop for one of yours without compiling against it.

WorldTerrainCheckedJigsawStructure is a jigsaw that only generates on flat, dry ground away from rivers and oceans. CategorizedMobSpawnTable spawns from a category table and skips ids that aren't in the registry, so entries from optional mods don't break anything.

CompatModGatedPackLoader mounts a bundled datapack only when the mod it targets is installed. It exists because LootDataManager parses every loot table under data/ eagerly, so a table naming another mod's function throws before any forge:conditions gets a say.

IntegrationFastCyclingItemStackRenderer for JEI.

Classes take your mod id and Logger as parameters rather than importing anything of yours, and registry ids stay on your side so saved worlds don't break if the lib moves.

Building

./gradlew build

The jar lands in build/libs/.

License

MIT. Full text in LICENSE.txt, which also ships inside the jar.

About

Shared building blocks for Bento's Minecraft mods. Curio, loot, worldgen and client helpers for Forge 1.20.1.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages