File Details
XoxoCraft 2.0.0
- R
- Jul 15, 2026
- 1016.14 KB
- 3
- 1.21.1
- NeoForge
File Name
xoxocraft-2.0.0.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
What's New
KubeJS integration — scriptable Twitch commands! KubeJS is now a required dependency (the CurseForge app installs it automatically, Rhino included): streamers can define brand-new
!commandsin JavaScript without touching the mod: drop a script inkubejs/server_scripts/and callXoxoCraft.registerCommand('name', cooldownSec, ctx => { ... }). Scripted commands inherit the full command pipeline for free: per-command cooldown, ≥50-bits bypass, Chaos Mode halving, per-user cooldown and the!skipcharge system. Thectxobject ships ready-made helpers (players(),effectAll,giveAll,healAll,damageAll,broadcast,twitch,actionbar,log) plus rawserveraccess, and supports player targeting (!cmd playername)./kubejs reload server_scriptshot-reloads command definitions. The mod keeps working exactly as before when KubeJS is not installed.Lap-colored hearts — when max health exceeds 10 hearts, the stacked vanilla heart rows are replaced by a single color-coded row: hearts 1–10 vanilla red, 11–20 orange, 21–30 yellow, 31–40 purple (visual cap at 40 hearts / 80 HP). The current lap draws over the previous lap's color. The colored hearts are pixel-identical to vanilla — including the little white shine — thanks to a two-layer sprite technique (tintable body + untinted highlight). With max health at 10 hearts or below, vanilla rendering is untouched.
Scriptable XP bar color — scripts can recolor the player's XP bar:
XoxoCraft.setXpBarColor(player, '#FFD800')/resetXpBarColor(player). The client redraws the filled portion of the bar in the given color (per-player, packet-synced, deduplicated). Used by the bundled daily-XP-limit example to turn the bar yellow when the daily cap is reached.Bundled default scripts — when KubeJS is installed, the mod extracts its official scripts into
kubejs/server_scripts/on first launch:xoxocraft_esempi.js(sample commands!boost,!merenda,!brivido),limite_exp.js(daily XP cap with per-level progression and yellow bar at the cap) andno_spawn_vanilla.js(disables natural hostile mob spawning — mobs come only from chat commands and mod events; spawners, breeding and eggs keep working). Both gameplay scripts are enabled by default and can be toggled off in-game. Existing files are never overwritten, so your edits survive mod updates. No runtime downloads — everything ships inside the jar (CurseForge-policy friendly).Balanced Diet script (
dieta.js) — every food fills one or more of 5 diet stats (🍖 protein, 🌾 grains, 🍎 fruit, 🥕 vegetables, 🍬 sugars, 0–100%), which slowly decay over play time. On your very first join you start with a perfect 100% diet — keeping it up is on you. Keep ALL stats above 60% for Speed + Haste, above 85% for Regeneration + Resistance too (the latter unlock at XP level 2+). Let even a single stat drop below 40% and you get a malus: -2 max hearts and Slowness until you fix your diet (scripts can now apply max-health modifiers viaXoxoCraft.setMaxHealthModifier— transient, self-cleaning on relog). Food tiers = XP level: 33 foods across 6 tiers (level 0–5) — foods above your XP level cannot be eaten at all (bite cancelled with an actionbar notice; raw basics at level 0, cooked food from level 1–2, golden apples at 4+). Food gating is suspended inside mod event dimensions so event kits keep working. Eating shows a color-coded summary in chat; Twitch chat can check the streamer's diet with!dieta. Food tooltips show each food's diet values and tier, with a live green check / red lock line based on your current XP level (scripts register tooltip info viaXoxoCraft.registerFoodTooltip). A 🍽 button in the inventory screen opens a live diet panel: color-coded bars for the 5 stats with the bonus threshold marker, current bonus status and XP level (scripts publish data viaXoxoCraft.setDietDisplay). Food table, tiers and thresholds are fully editable in the script.Bitter Death script (
morte_amara.js) — every death drains 5% from all diet stats: you respawn "weakened" and closer to the diet malus. Configurable percentage.Daily Login script (
login_giornaliero.js) — the first time you play each real day you get a base reward, and consecutive days build a streak with milestone rewards (3/7/14/30 days: iron → diamonds → netherite). Skipping a day resets the streak. Works retroactively if you're already in the world at midnight.In-game script toggles — Options → XoxoCraft options → 📜 KubeJS Scripts: every bundled script declares an on/off switch (
XoxoCraft.registerFlag(id, default, label)+XoxoCraft.isEnabled(id)— also available to your own scripts). Toggle, hit "Save and reload scripts" and the change applies instantly (values persisted inconfig/xoxocraft_script_flags.properties; saving also re-runs/kubejs reload server_scripts).
Changes
- NeoForge minimum raised to 21.1.199 (project now builds against 21.1.235) — required by KubeJS 2101.7.2. Update your NeoForge if you're on an older 21.1.x.
Technical Changes
- HUD recoloring recipe (hearts + XP bar): cancel/append on the specific
RenderGuiLayerEventlayer (PLAYER_HEALTHPre withleftHeightcompensation,EXPERIENCE_BARPost) — the genericRenderGuiEvent.Postcannot draw over the XP bar. Each vanilla sprite is split into*_white.png(dominant-channel grayscale, tinted viaGuiGraphics.setColor— luminance-based grayscale turns saturated red into brown) and*_glare.png(only the truly whitish pixels,min(R,G,B) > 100, drawn untinted) so highlights stay white under any tint. XpBarColorPacket(server→client, int ARGB, 0 = vanilla) with per-player dedupe (ScriptedCommands.xpBarLastSent, cleared on login) — scripts can callsetXpBarColorevery tick without network spam.extractBundledKubeJSScripts()(same pattern asextractBundledImages): resources fromassets/xoxocraft/kubejs_scripts/, guarded byModList.isLoaded("kubejs"), copy-if-absent intoFMLPaths.GAMEDIR/kubejs/server_scripts/.- New
ScriptedCommands(KubeJS-free registry + IRC→tick queue +Contexthelpers +Apibinding) andcom.xoxocraft.kubejs.XoxoCraftKubeJSPlugin(the only class importing KubeJS, loaded viakubejs.plugins.txtonly when KubeJS is present). Scripted cooldowns are injected intoTwitchIRCClient.COOLDOWNSat registration and removed on script reload (beforeScriptsLoaded); native command names cannot be overridden. - Both dispatch switches (
handleMessage,executeScheduledCommand) fall through toScriptedCommands.tryQueuein theirdefaultbranch; handlers run on the server thread viaScriptedCommands.tick(called fromtickNewCommands2). - Build:
compileOnly dev.latvian.mods:kubejs-neoforge:2101.7.2-build.368(maven.latvian.dev);kubejsdeclared as optional dependency inneoforge.mods.toml.