promotional bannermobile promotional banner

Create: Packager Guard

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 Team

profile avatar
  • 16
    Projects
  • 484
    Downloads

More from mornfireView all