Immersive Engineering

Immersive Engineering

134M Downloads

[1.14.4] Current Transformer always displays average transfer of 0 Flux/t

gyroplast opened this issue ยท 0 comments

commented

Description of the issue:

When right-clicking a hooked-up current transformer, an average flow of 0 Flux/t is always displayed in the chat instead of the actual average transferred Flux per tick. Power is being transferred from source to sink successfully.
Reproduced in single player, creative and survival.

2020-04-12_08 04 06

Through some tracing I noticed how in blusunrize.immersiveengineering.api.wires.localhandlers.EnergyTransferHandler#update, the transferredInTick.clear() method is called after transferPower(), but that update method is run regularly before the blusunrize.immersiveengineering.common.blocks.metal.EnergyMeterTileEntity#tick method is grabbing the data from transferredInTick for averaging, thus always getting an empty map for consideration. The transferredInTick map itself seems to be created just fine before its clear()ing, so I wager to guess it is a matter of timing, and not a data collection problem here.

I did not analyse further at that point, as I lack insight into how wire network updates and entity ticks are supposed to be tied together properly, sorry.

Versions & Modlist

IntelliJ project runClient defaults:

  • MC 1.14.4
  • Forge 28.2.3
  • Immersive Engineering 0.14-95-28137880
  • NBTEdit 0.8.1
  • Just Enough Items 6.0.0.11