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

Threshold Switch cannot detect items from the item vault #1427

Closed
feipangjun opened this issue Apr 7, 2024 · 3 comments
Closed

Threshold Switch cannot detect items from the item vault #1427

feipangjun opened this issue Apr 7, 2024 · 3 comments
Labels
type: bug Issue where something isn't working

Comments

@feipangjun
Copy link

feipangjun commented Apr 7, 2024

Describe the Bug

Threshold Switch cannot detect items from the item vault
I noticed that the Threshold Switch can work properly on build.1376, but when i update to build.1394. The problem floated out. And it still exist on build.1408

Reproduction Steps

1.install the build.1394 or higher
2.place the item vault and put some item in it
3.place a Threshold Switch and use it to detect items

Expected Result

Screenshots and Videos

2024-04-07_21 54 25
2024-04-07_21 57 49

Crash Report or Log

No response

Operating System

Windows 11

Mod Version

0.5.1f

Minecraft Version

1.20.1

Other Mods

Fabric loader 0.15.7
Fabric API 0.92

Additional Context

No response

@feipangjun feipangjun added the type: bug Issue where something isn't working label Apr 7, 2024
TropheusJ added a commit that referenced this issue Apr 8, 2024
@vlad-iakovlev
Copy link

vlad-iakovlev commented May 23, 2024

Hello @TropheusJ, I think this fix broke compatibility with Extended Drawers mod, MattiDragon/ExtendedDrawers#102. Current behavior is that Threshold Switch thinks that the maximum amount of items in slot is 64, while drawers allow to store multiple stacks and they do it in one slot.

Replacing long space = Math.min(stackInSlot.getMaxStackSize(), view.getCapacity()); with long space = view.getCapacity(); may help to solve this. Not sure if it will affect vaults or not.

I'll try to patch this, test with Extended Drawers and let you know the results

@IThundxr IThundxr reopened this May 23, 2024
@vlad-iakovlev
Copy link

Just checked, replacing long space = Math.min(stackInSlot.getMaxStackSize(), view.getCapacity()); with long space = view.getCapacity(); fixes the issue with Extended Drawers.

@Roger-Roger-debug
Copy link

Tested it as well and it doesn't seem to break item vaults. This also is in line with c8685f3. Would close both this issue and #1459

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

5 participants