跳到正文

Upgradable Gaps

作者:WhoIsTyfur

Upgrade a golden apple into a enchanted golden apple with a stack of gold ingots.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Upgradable Gaps

Upgrade a golden apple into an enchanted golden apple. with 64 gold ingots.
Everything in this mod is server-side: players will need nothing extra with the
exception of very old Forge versions, see Installing), and it obviously works
in single-player worlds too.

Server Minecraft Jar
Fabric, Quilt 1.14 – 26.3 +fabric-mc<versions>
Ornithe (Fabric Loader on old versions) 1.3.1 – 1.13.2 +ornithe-mc<versions>
Forge 1.3.2 – 26.3 +forge-mc<versions>
NeoForge 1.20.2 – 26.3 +neoforge-mc<versions>
Bukkit, Spigot, Paper, Purpur, Folia 1.7.10 – 26.3 +bukkit (one jar for all)

The Forge range skips the Minecraft versions Forge itself never shipped (1.16,
1.17, 1.20.5, 1.21.2 and so on).

The recipe

Place 8 gold ingots in each of the 8 outer slots of a crafting table, with a
golden apple in the center. That is a total of 64 ingots plus the golden apple’s 8:
the same 72 ingots worth of gold as the old notch apple recipe.

Why this needs a mod instead of a data pack

Vanilla crafting cannot express “a stack of items in one slot”. An
Ingredient in recipe JSON has no count field, and the result slot removes
exactly one item from every filled slot. A data pack recipe asking for gold
ingots around a golden apple would cost 8 ingots, not 64, and there is no JSON
knob that changes it.

So every build does the same two things: when the grid matches, it puts the
enchanted apple in the result slot and sends it to the player; when the player
takes it, it removes 8 ingots from each outer slot instead of one. How it
hooks in depends on the platform:

  • Mixin (Fabric, Quilt, NeoForge, Forge 1.15.2+, Ornithe): one mixin on
    the crafting menu’s grid update and one on the result slot.
  • JS coremods (Forge 1.13.2 – 1.15.1, which has no Mixin): the same two
    hooks, injected through Forge’s own coremod system.
  • A registered recipe plus crafting events (Forge 1.3.2 – 1.12.2): before
    1.13 the server never sends its recipes to clients, so a real recipe is safe
    there.
  • Inventory events (the plugin): it cancels the click on the result slot
    and does the craft itself.

On 1.13 and newer it registers nothing into any registry and adds no
recipe serializer. That is what keeps vanilla clients able to join: since 1.13
the server sends every recipe to every client on login, and a vanilla client
cannot decode a recipe type it doesn’t have.

Installing

Drop the jar for your server and Minecraft version into mods/ (or
plugins/ for the plugin) and restart. Jars are named
upgradable-gaps-<version>+<platform>-mc<versions>.jar.

  • Fabric / Quilt: any Fabric Loader 0.14+, or Quilt Loader. No Fabric API
    needed.
  • Ornithe: install Fabric Loader with the Ornithe installer first; these
    jars do not run on Legacy Fabric.
  • Forge 1.15.2 needs Forge 31.2.44 or newer (the first with Mixin).
  • Forge 1.3.2 – 1.7.10: Forge servers this old turn vanilla clients away,
    so players need Forge installed. They do not need this mod.
  • Forge 1.3.2 – 1.5.2 has one jar per Minecraft version: Forge that old
    loads mods by obfuscated names, which change with every release.
  • Forge 1.7.2 only starts on Java 7; the one jar covers 1.7.2 and 1.7.10.
  • NeoForge: any build for your Minecraft version.
  • Plugin: one jar for every Bukkit-based server from 1.7.10 on, Folia
    included.

Things worth knowing

  • Recipe book. The recipe doesn’t appear in it, and that is a hard vanilla
    limit: the recipe book renders one item per slot with no count, and its
    click-to-fill places one item per slot. An entry would fill the grid with
    8 ingots and then not craft, which is worse than no entry. It works fine
    arranged by hand — you’ll want to tell players about it.
  • The vanilla golden apple recipe is untouched. Nothing overrides, removes
    or edits it, and this recipe cannot collide with it: its centre is a golden
    apple, not an apple.
  • Batch crafting works. Stack golden apples in the centre and 8 ingots per
    apple in each outer slot, then shift-click the result to craft several at
    once.
  • Crafters. The recipe does not work in a Crafter block. A Crafter
    consumes exactly one item per slot and resolves recipes through the recipe
    manager, which knows nothing about this pattern. That is deliberate —
    letting it through would let a Crafter make notch apples for 8 ingots and a
    golden apple. Other auto-crafting mods will behave the same way, for the same
    reason.
  • doLimitedCrafting. The recipe ignores that game rule and stays
    craftable, because there is no recipe entry for a player to unlock.
  • Vanilla clients see a one-frame flicker of the input slots when crafting:
    their local prediction assumes one ingot per slot, and the server’s
    correction arrives a tick later. Cosmetic only — the server is
    authoritative.

Tuning the amount

INGOTS_PER_SLOT is the constant, in each source tree (Upgrade in
modern/src/common, and its counterparts in ornithe/, forge-legacy/ and
bukkit/). Both the match and the consumption read from it, so they stay in
step. Change it everywhere and rebuild.

License

Copyright (c) 2026 Tyler Fursman. Licensed under the
Mozilla Public License 2.0.

常见问题

Upgradable Gaps 支持哪些 Minecraft 版本?

Upgradable Gaps 支持 Minecraft Java 版 1.3.2–26.3,共 74 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Upgradable Gaps 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

WhoIsTyfur 的其他作品

查看全部 →