BuildCraft|Factory

BuildCraft|Factory

7M Downloads

[BC 7.99.24.6] Filters can not distinguish different potions from each other

Opened this issue ยท 5 comments

commented

Buildcraft filters can not tell the difference between potions (i.e. mundane potion and regeneration II. drink potion). Due to this all potions will be let through, not just those added to the filter. Note: the filter can tell the difference between standard drink and splash potions, the issue only persists with potions of the same type (drink potions, splash potions and lingering potions).

Environment information

  • Forge Version: 1.12.2. 14.23.5.2854
  • BuildCraft Version (Add Hash if from github): 7.99.24.6
  • Any additonal mods: IC2, Galacticcraft (not relevant to issue)

To Reproduce
Steps to reproduce the behavior:

  1. Place diamond pipe or diamond wooden pipe and hook it up to a system.
  2. Add a potion to the filter.
  3. Enter potions into the system (potions of the same type as the one in the filter, i.e. drink-, splash-, lingering potions)
  4. See that ALL potions pass through the filter, not just those specified in the filter.

Thanks!
Robert

commented

Use a list with the exact option selected

commented

if (StackUtil.isMatchingItemOrList(compareTo, toCompare)) {

On this line we call StackUtil.isMatchingItemOrList (Itemstack base, Itemstack comparison) which DOESN'T CHECK NBT DATA when comparing. Why not?

Simple fix seems to be to change

return isMatchingItem(base, comparison, true, false);

to

return isMatchingItem(base, comparison, true, true);

unless potions are an instance of IList, in which case I don't know what happens (I couldn't find where IList was defined).

commented

Use a list with the exact option selected

Where can I set that? I don't see such an option on either the diamond nor diamond wooden pipe.

commented

The 'list' is a seperate item which provides extra filtering options for thus pipes. You then put the filtered list into the filter you desire. https://youtu.be/_Z1leMHp-AM?t=285

commented

Gotcha, works like a charm! Thank you very much!

[PS. Now I know what that IList was in the code :)]