介绍
Create: Re-Packager Fix
A server-side fix mod for Create that patches a duplication exploit in the Re-Packager. When a fragmented package carries insufficient inventory to fulfill the crafting recipes of its order, the Re-Packager still generates a package entry with a quantity of 0 — which the packager’s output logic then ejects as a real physical package containing a full copy of the recipe materials, allowing attackers to duplicate recipe materials infinitely. This mod patches PackageRepackageHelper.repackBasedOnRecipes via Mixin, eliminating the duplication at its root without affecting normal packaging behavior.
The Vulnerability
Affected versions: Create 6.0.8 (1.20.1), 6.0.10 (1.21.1), and the Create Fly ports (1.21.11 / 26.2).
- Crafting arrangements configured on the Factory Gauge are not bound by inventory validation — recipe materials are not required to match the requested items (Create only checks this consistency in the Redstone Requester path; the Factory Gauge path misses this check entirely).
- When inventory is insufficient,
repackBasedOnRecipesstill generates a package entry withpackagesToCreate == 0. - (The core issue) The packager’s output logic
PackagerBlockEntity.tick()copies the package out before checking its count (heldBox = entry.stack.copy()precedescount--), so a count-0 package is emitted as a real one — an empty inventory produces a package containing a full set of recipe materials out of thin air, infinitely exploitable via the Factory Gauge’s recurring restock requests.
Related upstream issues (all still open): #8082, #8046, #8155. Upstream commit 3e662789 only fixed the oversized recipe-material variant (copyWithCount(1)); the core defect remains unfixed.
The Fix
Mixin patch on PackageRepackageHelper.repackBasedOnRecipes using a two-phase validation:
- Check first — verify all recipe materials are available (NBT-exact match); if any is missing, abort the whole round without consuming anything.
- Consume second — only after everything is confirmed available, deduct the inventory uniformly; no partial consumption, so players never lose invested materials.
- Zero-count guard — when
packagesToCreate == 0(inventory cannot support even a single craft), no package is generated.
All normal behavior (sufficient stock, multi-recipe orders, etc.) remains fully identical to vanilla.
Features
- Server-side only — clients can join without installing it
- Does not affect normal packaging / re-packaging
- Materials are returned (via regular repackaging) instead of being swallowed when partially insufficient
- Coexists with other fix mods
Verification
Feed the Re-Packager an anomalous package (empty inventory + a crafting order claiming 64 crafts):
- Without this mod: 1 package containing a full set of recipe materials is output (duplication)
- With this mod: 0 packages are output (fixed)
Test package commands are documented in TEST_PACKAGES.md in the repository.
常见问题
Create: Re-Packager Fix 支持哪些 Minecraft 版本?
Create: Re-Packager Fix 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Create: Re-Packager Fix 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
SOLR98 的其他作品
查看全部 →
beyond:Cmd-Extension
The mod extends the limited command set of Beyond Dimensions, adding comprehensive network management capabilities and additional utility features.
Beyond:Integration
This provides more support and network management commands for Beyond Dimension.
评论
登录后评论和评分