Kneelawk/WiredRedstone

[1.18.2] Assembler charging

Closed this issue · 4 comments

While charging internal buffer goes up to 32K and then jumps to -32K

Oh dear. I only tested the assembler using coal. This might be an energy api bug, but given that I've never seen other machines do this, I'm probably using the energy api wrong.

Thanks for letting me know. I'll try and fix this as soon as I can.

Just did a few more tests. That happens only playing on server and with any vanilla/moded fuel/power.

Sneaky little update: Those negative values are seems to be only a visual bug. As assembler itself do its job and reduce stored power back to -32K. After that it should jump to +32K again I guess. And so on until whole 128K depleted. it's strange that fully charged assembler show -4K in buffer.

Ok, I bet this is an encoding problem then. I only tested this in single-player, forgetting that single-player doesn't normally force packet encodes/decodes and just passes packet objects between logical-server and logical-client directly. Somewhere the energy value must be being cast to a short and then back.

Ok, this is fixed in versions v0.3.7+1.18.2 and v0.4.8+1.19 on Modrinth and CurseForge.