Skip to content

Crafting Stations Can Bypass Max Stack Sizes #2774

@tim-burget

Description

@tim-burget

GregTech CEu Version

v2.8.10

Modpack Used

Originally found in Nomifactory CEu, but confirmed to also occur in an instance with only GTCEu and its dependencies installed

Addons Installed

No response

Environment

Singleplayer

New Worlds

Yes

Cross-Mod Interaction

No

Expected Behavior

Shift-right-clicking the output slot in a Crafting Station causes it to always treat the max stack size as 64 when placing the resulting items in your inventory.

Actual Behavior

The Crafting Station should respect the max stack size of the item you're crafting when bulk-crafting more than one stack at a time.

Steps to Reproduce

  1. Place a Crafting Station and empty your inventory.
  2. Grab six stacks of iron plates and a hammer with at least 128 crafting uses left.
  3. Open the Crafting Station GUI.
  4. Set up the craft for buckets.
  5. Place the hammer and the six stacks of plates in the Crafting Station's inventory.
  6. Shift-right-click the output slot in the GUI.
  7. Note that you get two stacks of 64 buckets each, rather than eight stacks of 16 buckets each like you would expect.

Additional Information

This can be exploited to allow efficient duplication of almost any item. How to do so is left as an exercise for the reader. Copy-pasted this from an issue I made on Nomifactory CEu and forgot to check whether base GTCEu had any items with inventories you could access without placing them. As far as I can tell, it doesn't.

Also, it actually does take stack size into account when determining how many of the desired item you can fit in your inventory, just not when it actually puts them there. I suspect it must use the default stack size rather than the max stack size for the given item in the code that handles placing the crafted items in your inventory after shift-right-clicking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions