Create

Create

86M Downloads

Stockpile switch math is off when slot sizes differ

MattiDragon opened this issue ยท 2 comments

commented

Describe the Bug

The current implementation of the stockpile switch calculates the fill level of each slot individually and adds them up. This causes issues with inventories that have slots of differing sizes.

Reproduction Steps

  1. Install create and any mod that provides differently sized slots (for example, extended drawers (fabric)).
  2. For extended drawers, build a network with a two slot drawer and an access point
  3. Add an upgrade to one slot
  4. Connect a stockpile switch to the access point
  5. Play around with items and notice items if different slots have a different impact on the total

Expected Result

Create should calculate the total item count and capacity separately and then combine them.

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 11

Mod Version

0.5.1d

Minecraft Version

1.20.1

Forge Version

NA

Other Mods

No response

Additional Context

I have only tested this on the fabric version, but according to the code it's present on forge too and thus should be reported here.
The offending code is here.

commented

I can confirm on Minecraft 1.20, Neoforge 47.1.96, Create 0.5.1.f and Sophisticated Storage (at least, as I've got this one on hand) 0.8.65.680 & Sophisticated Core 0.5.113.524.

Edit: To confirm the problem exists only for the stack size for SoSt upgrading the size doesn't change the storage seen by the TSwitch, but upgrading the storage tier does work.

commented

Same issue with fabric and the different storage units from Tech Reborn. 3 inventory slots (input, output, and the internal storage which is not accessible). each slot takes 33% of the threshold switch.