AkumaLib 2.5.0
Curse Maven Snippet
What's new
AkumaLib 2.5.0
Two large groups of additions since 2.4.0: professions (workstations, catchable creatures, traps, gathering) — the systems behind Cruise Cruise no Mi — and worldgen and dimensions (a cell grid, the overworld read from another dimension, travel between dimensions, the worldgen and fluid registers) — the ones behind Mine Mine no Mi: Sky Island. Both are written for every addon.
No signature was removed or changed: an addon built against 2.4.0 keeps compiling and keeps working. That is why this is a minor bump.
Requires Minecraft 1.20.1, Forge 47+ and Mine Mine no Mi 0.11.5. JEI and EMI are optional.
⚠️ The network protocol moves from 2 to 3: a client and a server must both run 2.5.0, or the connection is refused. Update both sides together.
New
Professions
- Framework: a profession registry (
AkumaProfessionRegistry), per-player XP and levels (AkumaProfessions, theProfessionDatacapability), level curves in data (data/<ns>/professions/*.json:base_xp × L^exponent), synced to the client. Events:ProfessionXpEvent,ProfessionLevelUpEvent,ProfessionChangeEvent. - Modes (
akumalib-server.toml,professionMode): Solo (every profession), Crew (one chosen profession per player; changing it resets everything), Auto (Solo in singleplayer and LAN, Crew on a dedicated server)./professioncommand (choose, mode, reset, get, set, addxp). - Professions screen (K, and a plank on Mine Mine no Mi's character screen): levels and XP; in Crew mode only the chosen profession, or the list with Choose buttons before any choice.
- Profession pages: the screen wears Mine Mine no Mi's parchment and planks; clicking a profession opens its page in the base mod's book: level, perks (
Profession.withPerk) and unlocks by level (ProfessionUnlocks: workstation recipes, profession-only seeds and blocks by their minimum level, and addon providers; synced from the server). - Mine Mine no Mi's character creator: in Crew mode, a fourth tab "Profession" (a client mixin): the arrows cycle the professions and Random, Finish applies the choice.
- Icons: an item (
withIcon) or a dedicated texture of any size (withIconTexture), shown in the screen and in the creator tab. - XP boosts:
ProfessionXpBoostEffect, and exclusive effect groups (AkumaEffectGroups: one effect of a group at a time).
Workstations
WorkstationBlock+ProfessionRecipe(JSON, shapeless, a level and an XP each) + one shared menu and screen: recipes shown as silhouettes until the level is reached and until first made.ProfessionCraftEventcan change the result.- Recipes are not a crafting grid: up to 36 ingredients (
ProfessionRecipe.MAX_INGREDIENTS), read as a bill of materials (getPortions(): each ingredient with its count). The workstation screen shows each line as have / need. - JEI and EMI: every workstation of every addon gets a category (the ingredients as a list with their counts, the result, the level, the XP), with no addon code.
- Notes in JEI and EMI (
RecipeViewers.note(items, text...)): an information page for an item no recipe explains (a part made at one station and fitted at another). - Profession drops in JEI and EMI (
ProfessionDrops): what a gathering profession gets and from what (the rocks a miner breaks, the creatures a hunter catches), with each output's chance, count, level and XP; built on the server and synced before the recipes.LootSummaryreads a loot table into outputs with their chances.CreatureHabitatssays where a catchable creature lives (its biomes in the wild and in traps), shown under a "Where?" label;BiomeNamesis the biome list it uses, for any other "where" line.
Catchable creatures
CatchableCreature/CatchableFlyingCreature: small creatures caught rather than killed, with variants (a rare one as a texture swap), a minimum render range, a capture that rollscapture/<entity>and firesCreatureCaptureEvent, and release from an item (a released creature is calm and kept).- Reactions to a player who does not sneak:
FLEE,TAKE_OFF(runs 2–3 s, flies off and vanishes),ATTACK(a few hits, then the take-off). - Perches (
CreaturePerch): on top of a block (a hornet on a flower, a lizard on a rock) or on a side face (a beetle on a trunk, drawn nose up byCatchableCreatureRenderer); still until disturbed or hurt; tall plants are sat on, not in; one creature to a block; breaking a perch (or the block above or below it) startles the creature, which flees. - Flying creatures stay airborne when spawned in the air; one that
canLand()rests on solid ground now and then (never on water); they flee up into the air. - Surface spawner (
data/<ns>/creature_spawns/*.json: entity, biomes, chance, group, max around the player, sky, altitude): tries every 5 s around each player, on the surface, through the entity's own spawn rules. Vanilla's natural spawning put most attempts underground. - Creature spawns take an optional
time(dayornight: a firefly),underground(a spot in the caves under the surface: a floor, room above, no sky),min_yandmax_y(with the biomes under the base mod's sky islands, the islands alone). - Creature spawns keep to their dimension: the Overworld, unless
"dimensions"names others ([]for every one). An entry with no biomes no longer spawns in the Nether. - Lures:
CreatureSpawns.lure(level, player, rounds)runs a player's spawn entries a few rounds early and says how many landed. It cannot bring anything the place would not give on its own.
Traps
TrapBlock(+ one shared block entity type): set on the ground, it closes on a creature after a random delay, picked fromdata/<ns>/trapping/*.json(entity, weight, biomes, sky, which traps); a right-click collects it through the capture. Single use or reusable; optionally kept to one profession.- Trap catches keep to their dimension too: the Overworld unless
"dimensions"says otherwise. - A trap remembers what it was made of: the stack it was placed from (
getGear(), NBT included) is saved with it, handed to the capture, and given back when it is broken. Two hooks read it:delayFor(gear, random)andisSpentBy(player, gear).
Gathering
HangingFruitBlock: a fruit hanging under leaves that ripens (random ticks, bone meal) and grows back once picked; kept softly to a profession (others bruise half the fruit, practitioners sometimes pick two and earn XP). Hangs in generated trees through vanilla'sattached_to_leavesdecorator.ProfessionBlockItem: a block item only a profession's practitioners can place (a farmer's sapling) — or one of several (or(profession, minLevel): "Only a Farmer or a Lumberjack can plant this.").ProfessionCropBlockandProfessionSeedsItem(both item classes take a minimum level): a crop with the fruit's rules (others spoil half the ripe harvests, practitioners sometimes reap one more and earn XP), and seeds only the profession sows.
Worldgen and dimensions
- Worldgen registers on
AkumaRegistry:DENSITY_FUNCTION_TYPES,BIOME_SOURCES,CHUNK_GENERATORS,STRUCTURE_TYPES,STRUCTURE_PLACEMENT_TYPES,STRUCTURE_PIECE_TYPES,FEATURESandPLACEMENT_MODIFIER_TYPES. They register codecs and types; the instances come from datapack registries. ⚠️ A structure whose piece type is not registered generates once and is lost on reload. - Fluids:
FLUIDSandFLUID_TYPESonAkumaRegistry. AFluidthat is not aFlowingFluidnever flows — a body of liquid that stays where it was placed (a sea with no container); the javadoc says why and whatLiquidBlockwould do instead. AkumaCells: a deterministic grid of jittered cells, each of which may hold a round feature — "an island here, and nothing for a few thousand blocks".mask,cellAt,featureAt, and a filter every reader shares. The outline can be warped off a circle (off by default);blendmixes a per-cell value across overlapping features (weighted, no seam where two meet); aRadiusRule(withRadiusRule) lets a cell's radius depend on the cell. The nine-cell condition is stated in the javadoc as an inequality to check with your own numbers.OverworldLookup: the overworld's biome and seed from anywhere, including another dimension's worldgen thread:is(x, z, tag),coverage(x, z, tag)(0 to 1, smoothed over a window wide enough to be a fade),seed().AkumaDimensionTravel: send a body to another dimension with what it rides and who rides it, arriving with a chosen velocity (send); push an entity so the push sticks on the client, rider case included (launch); generate the arrival early (preload). The arrival chunk is held loaded across the transfer, for a boat or a mob as for a player.AkumaJigsaw: add a placed feature or a structure template to another mod's jigsaw pool (a village's decorations) at server start, without replacing its files.
Currency
AkumaCurrency: read, give and take Belly and Extol through Mine Mine no Mi.
Doriki
AkumaStats: read and grant Mine Mine no Mi's Doriki, synced to the client.DorikiGainEffect: an effect that multiplies the Doriki earned in fights (NPC and player kills) while it lasts.AkumaDevilFruits: which fruit an entity ate, whether it is a Zoan, whether it is transformed; end its abilities' cooldowns.AkumaStats.runsOnCola/getCola/addCola: refill a cyborg's Cola as the base mod's Cola does, synced.SatietyEffect: an effect that slows hunger drain while it lasts.
Advancements
- Triggers
akumalib:profession_level,akumalib:profession_craft(item predicate on the result, NBT included),akumalib:creature_capture(creature, variant, tool, released).
Registry
AkumaRegistry: menu, block entity, recipe type and recipe serializer registers (and the worldgen and fluid registers above).
Fixes (within this cycle, never released)
- A data-load crash (
TrapCatchesbuilt before its Gson) that made every world fail to load. - The profession sync no longer throws for a player with no open connection (a player being disconnected, a game test's player).
- A blank profession no longer reads as a finished one ("level 1, Max", a gold XP bar).
- From the code review: a reusable trap waited no delay after a collection;
requires_skyfailed under leaves (now: nothing solid above); the spawner goes through Forge's spawn hooks; workstation ingredients are matched rather than first-fit; an interrupted take-off no longer leaves a creature floating.
This mod has no additional files

