Exporting into ME chest can overfill cells
Random832 opened this issue ยท 0 comments
Describe the bug
Exporting into an ME chest (at least, into a fluid cell - I have not tested other types of cells or other mods inserting into the chest) can cause the cell to be overfilled.
[the first time I encountered this "in the wild" the cell reported in its tooltip that it had 1025 of 1024 bytes, I have not been able to reproduce this particular message since, but I can easily reproduce overfilling a cell by less than a whole byte amount]
How to reproduce the bug
- Place and power an ME chest
- Place export bus from another network exporting lava into it with four accelerators
- I don't think the accelerators are required, but it makes it easier to reproduce.
- Create a 1k cell containing lava and water. The total amount of fluid should be some amount that is not a multiple 8 buckets
- Note: The total amount of fluid a 1k cell with two types can legally hold is 8064 buckets.
- The following command gives what I believe to be a well-formed cell containing 8063 buckets, but the bug can be reproduced without commands, it just takes longer.
/give @p ae2:fluid_storage_cell_1k{ic:8063000L,keys:[{'#c':'ae2:f',id:'minecraft:lava'},{'#c':'ae2:f',id:'minecraft:water'}],amts:[L;8062000L,1000L]}
- Place the cell in the chest.
- The export bus will place too much lava in the cell, more than its remaining capacity.
- The cell from the command above will have 8070 buckets of lava.
- up to 7 (theoretically up to 8) buckets removed from the cell cannot be reinserted.
Expected behavior
Cell should contain no more than the legal quantity of fluid [8064 buckets in the case of a 1k cell containing two types]
Additional details
No response
Which minecraft version are you using?
1.19
On which mod loaders does it happen?
Forge
Crash log
https://gist.github.com/Random832/d9ae7547bd6438c08836366e2465d2ba