Integrated Dynamics

Integrated Dynamics

63M Downloads

Variable cards not updating properply when used with delayer

Sharkum opened this issue ยท 3 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

The variable cards are not updating properly when used with the delayer. I am tracking a boolean with the delayer and using the delay variable card for creating other boolean cards. The boolean that is being tracked, is dependent on the inventory reader of a breeder from the chickens mod. I am breaking the breeder and replacing it at the same coordinates using the world block importer and world block exporter. Whenever the block is broken and placed again, the delayer stops tracking the variable.

Steps to reproduce the problem:

  1. Create a variable card for the list of items in the breeder from the chickens mod.
  2. Create a boolean from the list based on the number of items at index 4.
  3. Track the boolean using a delayer and store the last 3 states in a delay variable card.
  4. Break and place the breeder block using a world block importer and world block exporter.
  5. It can be seen that neither the states shown in the delayer or the delay variable card get updated.

Expected behaviour:

The delay variable card should update with the new values of the boolean card. Since last 3 states are being tracked, it should be [false,false,false] instead of being an empty list and showing [].

I also saw that manually taking any variable card out and putting it back in its slot made the delay card work again.

Any card throughout the network including the cards present in any of the importers or exporters could be taken and put back.


Versions:

  • This mod: 1.13.2
  • Minecraft: 1.18.2
  • Forge: 40.2.0

Log file: https://pastebin.com/NCrECJPe

commented

The problem actually was not that variables were not updating, but that the error message of the inventory reader's variable (no valid inventory) was not being propagated upwards.

commented

Thanks for reporting!

commented

There is a workaround for this. The ticks per operation for the inventory reader needs to be set to a higher number than the ticks per operation of the delayer. This makes it so that the list of items is never updated to an empty list and thus the delayer is not affected by the breaking of the block. But if the network detects that the block is not present, the delayer stops tracking the boolean.