跳到正文

Create: Packager Guard

作者:mornfire

fix some create package bug likely packaging machine

收藏

介绍

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

Create: Packager Guard

A server-side anti-duplication patch for Create 6.0.x, specifically fixing item duplication issues caused by the “simulated extraction → actual extraction” inconsistency in the regular Packager and the Repackager.

Why you need it

Create’s packaging process first uses extractItem(..., true) to simulate extraction and generates a package based on that, then performs the actual extraction — but it never verifies whether the real extraction actually succeeded in deducting the items. As long as the target container changes between the two steps, the container’s extractItem implementation returns items without actually removing them, or the Repackager’s two-pass scan is interfered with by chutes/hoppers/moving structures, duplication occurs: “the package is generated, but the original items are still there.”

Sable’s sub-levels and moving containers widen this timing window, but the root cause is on Create’s side; this mod does not depend on Sable’s code — Sable is an optional environment.

What it fixes

  • Regular Packager: Simulated extraction is immediately turned into real extraction and enters a transaction reservation; subsequent actual extraction consumes from the reservation and no longer accesses the inventory a second time.
  • Repackager: Packages obtained from the first scan pass are genuinely reserved; when an order is completed, the corresponding reservation is consumed, and if the order is not completed, it is safely returned.
  • Mismatched containers: If a container’s extractItem returns items but the inventory does not decrease, this packaging attempt is blocked and a single warning is printed.
  • Creative crate (BottomlessItemHandler): Retains vanilla infinite supply and does not participate in anti-duplication.
  • Automatic cleanup: Unused reservations are automatically returned when the method ends; if they cannot be placed, they are dropped at the packager’s position to avoid item loss.

Features

  • Server-side only: @Mod(dist = DEDICATED_SERVER), no client installation required.
  • No config, no new blocks/items — pure fix.
  • Compatible with Create 6.0.x / Minecraft 1.21.1 / NeoForge 21.1.x.
  • Author: mornfrost
  • License: MIT

常见问题

Create: Packager Guard 支持哪些 Minecraft 版本?

Create: Packager Guard 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Create: Packager Guard 怎么安装?

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

评论

登录后评论和评分

mornfire 的其他作品

查看全部 →