LaserIO

LaserIO

21M Downloads

NBT filter for 'Enchanted' lets all items through

radwadas opened this issue ยท 6 comments

commented

LaserIO version

1.6.8

Minecraft Version

1.20.1

Forge Version

47.2.20

Modpack & Version

ATM9 to the sky 1.0.5

Do you have optifine installed?

Yes

Describe the issue

NBT filter doesn't filter enchanted items properly

Steps to reproduce

  1. Set up 2 chests and 2 nodes
  2. Add item extraction card with NBT filter set to deny 'Enchantments' to node 1
  3. Add item insert card to node 2
  4. Drop some enchanted and unenchanted items to chest 1

Expected:
Only enchanted items are moved

Actual:
All items are moved.

Expected behaviour

Only unenchanted items are moved

Screenshots

image

Log files

No response

Additional information

I honestly don't know what I could be doing wrong. This seems like a basic function of that filter but is completely ignored.
Is there a way to debug this mod? Like see what the logic was behind it deciding if item in movable?

commented

I take a look in the code, and seems that the NBT filter is not comparing any tag, because the tags aren`t setted.
during the port to 1.20.6 we have a commit to code be able to compile that removes the setTag functions from NBT filters:
Commit: b7e2834#diff-a222e8dde2e48451302bf9b4773e2439ee6c68c05e73d02cf08f2d16ce905dadL54-R90

Maybe one possible fix is try to get a similar implementation from FilterTag
https://github.com/Direwolf20-MC/LaserIO/blob/main/src/main/java/com/direwolf20/laserio/common/items/filters/FilterTag.java#L76-L82

@Direwolf20-MC i tested too and seems that the NBT Filter is not working at all with Extract Cards or Insert Cards.

commented

Yea I had to disable NBT tags because NBT got removed from items :). But this bug report is for 1.20.1

commented

Funnily enough I was looking for a function for NBT Tags or Mod Tag that lets all items be detected, so that I can use a Sensor Card which checks for if ANY item is present in an inventory at all, not a specific one. Sadly that wasn't a function as it seems, but using this bug actually made me achieve what I was looking for. @Direwolf20-MC would you mind adding an NOR/NAND filter to the Sensor card so that we can make it output a signal if no item is defined/present? That way I needn't rely on a bug :)

Also, a dedicated Wildcard would be great.

commented

I'll see what I can do, i'll work on something once I get the NBT filter back

commented

Found the bug and it should be fixed going forward on the new Data Filter :)

commented

just to be clear. 1.20.1 is not going to get the nbt filter card fixed?
edit: actually, running same version of laserio and really don't know the mod well. my setup was doing this but then when I reduced it to like the OP stated, it worked fine. I'm chalking up my issues with not knowing the mods well. Figuring out that each nbt filter selected (if it acts like the tag filter like it says in the book) acts as an OR then that might explain why I was having issues.

It'd still be nice to know if 1.20.1 is getting no further updates (I think ur changelog states this) and to what extent that means? only critical crash bug fixes and nothing else?

edit2: upon further testing, the nbt filter which is what I'm most interested in, seems to not work so I'm back to square one.