CyclopsMC / IntegratedDynamics

A Minecraft mod to take full and automated control of your appliances.
http://cyclopsmc.github.io/IntegratedDynamics/
MIT License
126 stars 59 forks source link

"Export Items with Limit" does not keep the limit #1337

Closed uhloin closed 2 months ago

uhloin commented 3 months ago

Issue type:


Short description:

During evaluation of "Export Items with Limit" part of in-game manual I get to chest not 10, but 11-12 or even more items from my network.

Steps to reproduce the problem:

  1. Open "Export Items with Limit" part of in-game manual.
  2. Build network with with Logic Programmer and Variable Store and many items in chests with connected interfaces (do not know if number is important, but I have 10K items in 18 chests).
  3. Place single separate chest, connect Inventory Reader to right side and exporter to front, connect both to network.
  4. In the Reader make "Inventory Count" card.
  5. In the Logic Programmer create a card with Integer "10"
  6. In the Logic Programmer create a card "Less Than" with "Inventory Count" card at left slot and "10" at right.
  7. Put cards "Inventory Count" and "10" to Variable Store
  8. Put card "Less Than" to Exporter to "Export All Items" row
  9. Chest will get items but won't stop after get 10 items (condition less than 10 is false) and will get some additional items.
  10. Remove some items from chest, try again. Sometimes there will 10 items, but in other cases 11, 12 and more.

Expected behaviour:

The number of items in the chest should be limited by 10


Versions:

Log file:

rubensworks commented 3 months ago

Thanks for reporting!

rubensworks commented 2 months ago

This is working as intended.

By default, ID will transfer 64 items per tick, which can result in more items than your target being moved when using the boolean aspect. If you lower this item amount to 1, this should not occur anymore.