Item Network

by y_e_a_r

This mod adds a new logistics mechanic: The Item Network. It replaces trains and logistics bots by teleporting items and fluids directly between Network Chests and Tanks.

Tweaks
1 year, 1 month ago
1.1
2.19K
Logistics Fluids Logistic network Storage Cheats

b The problem is if you increase the number of items in the stack.

1 year, 2 months ago

If I use the ReStack mod and increase the number of items in the stack, a similar error occurs:
The mod is pretty useful if you want to increase production by thousands of times (ReStack)
0.7.3
Error while running event item-network::on_nth_tick(1)
Index out of inventory bounds.
stack traceback:
[C]: in function 'set_filter'
item-network/src/NetworkChest.lua:477: in function <item-network/src/NetworkChest.lua:408>
(...tail calls...)
item-network/src/GlobalState.lua:493: in function 'inner_update_entity'
item-network/src/GlobalState.lua:503: in function 'update_queue'
item-network/src/NetworkChest.lua:635: in function 'update_queue'
item-network/src/NetworkChest.lua:686: in function <item-network/src/NetworkChest.lua:684>

1 year, 2 months ago
(updated 1 year, 2 months ago)

This makes sense. The Item Network mod was written assuming that item stack sizes never change.

Does this bug occur when you enable the ReStack mod on a factory with Item Network, or when you enable Item Network on a factory with ReStack?

In the short term, the only fix might be to change the stack size before creating Network Chests or to delete the network chests with large stack sizes before removing the ReStack mod.

I made a github issue to track progress on the fix.

1 year, 2 months ago

Instead of the usual ReStack I decided to use the Better ReStack mod, because the first one does not allow you to change all the resources and there are errors already in your mod. In the second one I changed only 1 value and the stacks changed to everything at once, and there are no errors

New response