Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stockpile switch math is off when slot sizes differ #5299

Closed
MattiDragon opened this issue Aug 8, 2023 · 3 comments
Closed

Stockpile switch math is off when slot sizes differ #5299

MattiDragon opened this issue Aug 8, 2023 · 3 comments
Labels
type: bug Issue where something isn't working

Comments

@MattiDragon
Copy link

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.

@Phlayne
Copy link

Phlayne commented Feb 11, 2024

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.

@DDzwiedziu
Copy link

DDzwiedziu commented Feb 26, 2024

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.

@IThundxr
Copy link
Collaborator

IThundxr commented Nov 6, 2024

Should be fixed by the latest few updates, if this still occurs feel free to open a new issue.

@IThundxr IThundxr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue where something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants