Integrated Dynamics

Integrated Dynamics

63M Downloads

== bool not working with dynamic and static list

Rodg88 opened this issue ยท 3 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

Equals boolean not matching an inventory reader item list with a list made from the same list in a materializer.

Steps to reproduce the problem:

  1. Set up an AE2 system, and have an interface keeping a set of single items in stock (with a crafting card). Attach an inventory reader.
  2. Set var card to the item list of the inventory reader.
  3. Use a materializer to take a static copy of the inventory reader list, while the same items are in the interface.
  4. The two list cards show the same list in a display panel.
  5. Make a bool == card comparing the inventory reader list to the static list. Placing the bool card in the display panel shows false, even though no items in the interface have changed.

I also tried building a list manually in the Logic programmer, taking the items from the same interface, and replacing them after, and they still wouldn't match.

Duplicating the inventory reader list in a crafting table will match itself.


Versions:

  • This mod: ID:0.11.17, IT:1.5.6, CC:0.11.10
  • AE2 rv6 stable 2
  • Minecraft: 1.12.2
  • Forge: 14.23.5.2768
  • Enigmatica 2 Expert Skyblock modpack, 1.16a
commented

Thanks for reporting, I'll look into it as soon as possible!

commented

Just tested it in a simpler instance with updated mods, and with a chest instead of an AE interface, and the two lists still wouldn't match. Also tested with a tiny chest with only one inv slot so no empty slots in the list, still no matching the lists.
Comparing 'slot item' with a materialized item card, instead of list cards, did work properly with the bool =.

This instance had: MC 1.12.2, Forge 2772, ID 0.11.18, IT 1.5.6, CycCore 0.11.11, ComCap 1.4.0

commented

Ok, good to know, thanks for checking.

For reference, the problem is that our list proxies don't all override the equals method, as is expected higher in the chain: https://github.com/CyclopsMC/IntegratedDynamics/blob/master-1.12/src/main/java/org/cyclops/integrateddynamics/core/evaluate/variable/ValueTypeListProxyPositionedInventory.java#L15

GitHub
A Minecraft mod to take full and automated control of your appliances. - CyclopsMC/IntegratedDynamics