pkmnfrk / equivalentintegrations

Equivalent Integrations - expanding EMC to the rest of the Minecraft ecosystem
Other
7 stars 4 forks source link

If an item's NBT data is simply "{}", the filter will not let it through. #15

Closed BlockBuilder57 closed 5 years ago

BlockBuilder57 commented 6 years ago

Hey, the new NBT filter is absolutely amazing, but there's a slight oversight in the fact that if an item's NBT data was cleared and not deleted, it still won't be allowed to pass through the filter. Hopefully this is an easy fix, I would do it myself if I knew your code base better.

Semi-useless demonstration: https://puu.sh/BvfMG/5df9919c37.mp4

pkmnfrk commented 6 years ago

Hm, an interesting observation. It should be an easy fix as you say. I kinda didn’t realize that this was allowed, but I guess I also don’t see any reason why not.

I’m out of town this weekend, but if you wanted to give it a shot, check out the EMCInventory class inside the storage package.

On Sat, Sep 15, 2018 at 12:05 AM BlockBuilder57 notifications@github.com wrote:

Hey, the new NBT filter is absolutely amazing, but there's a slight oversight in the fact that if an item's NBT data was cleared and not deleted, it still won't be allowed to pass through the filter. Hopefully this is an easy fix, I would do it myself if I knew your code base better.

Semi-useless demonstration: https://puu.sh/BvfMG/5df9919c37.mp4

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pkmnfrk/equivalentintegrations/issues/15, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRaODCvgnv8VYWmkHlGF_TrHMdmo-ynks5ubHyNgaJpZM4WqL2f .

-- Mike Caron

BlockBuilder57 commented 6 years ago

For whatever reason, testing for "{}" doesn't work, so I've checked if the NBT string is less than 4 characters. Even with the smallest tag, the full data will be 5 characters (ex {a:1}) so this should theoretically work. If not, at least it works on my machine, with the item I showed in the demonstration. I made #16 and hopefully it should fix the errors.

pkmnfrk commented 5 years ago

Resolved with #16. Thanks!