Extended Drawers

Extended Drawers

145k Downloads

[Bug]: Comparator Output of Shadow Drawer is based on the entire Storage

Fisch03 opened this issue ยท 4 comments

commented

Description of the issue

I'm not sure if this is just the intended behaviour, but using a Comparator on a Shadow Drawer that is connected to multiple Drawers always outputs how much of the total Storage of the Network is being used. I would expect the Shadow Drawer to output the same signal strength that its "normal" Drawer counterpart outputs.

2023-03-31_17 19 14
(I am using Create in this image to make reading the signal Strength easier but the bug also occurs with no other mods installed.)

Reproduction steps

  1. Connect more than one Drawer together in a Network and add some items
  2. Add a Shadow Drawer and read its Comparator output
  3. The Signal strength is always the same, no matter what item it is assigned to, being based on the total usage of the Network

Mod version

Tested on both 1.3.6 and 1.3.7

Operating System

Windows 10

Minecraft version

1.19.2

Other mods

Fabric API 0.73.2

Server

Happens

Client

Happens

Logs

N/A

Extra Context

No response

commented

This isn't easy to fix. I use fabric apis utility for caclulating the comparator output, but it doesn't account for how much of the capacity is usable and can't easily either. I'd probably have to write the logic myself.

There's also the issue of how it should work in the first place. It's a bit weird that inserting an unrelated item can cause the fill level of a shadow drawer to change (filling empty drawer), but it's also not good if empty drawers didn't count for the capacity as redstone would then mistake the system as full.

The best solution might actually be to just remove comparator support from shadow drawers. What do you think?

commented

Hmm this is tricky. For one removing it entirely would avoid confusion, but on the other hand if you only have one Drawer, it does work as intended and still has it's use cases.

I could see a potential solution with removing the output from Shadow Drawers and adding a new block called a "Storage Monitor" or something like that that acts like Shadow Drawers do right now and outputs the fill level of the entire network. I don't know how much work something like that would be though.

I'd also gladly offer my help but unfortunately my Minecraft Modding knowledge is next to nothing... I'll try to see if i can do something anyways.

commented

For network fill level the best way would be to implement comparator support on access points. That wouldn't cause issues

commented

Closing this now. Latest version has comparator support on access points and no support on shadow drawers. If you have ideas on how to implement comparator support on shadow drawers then you can let me know on discord.