PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Pneumatic helmet interaction with RFTools powercell crashes

Flanks255 opened this issue ยท 4 comments

commented

MC: 1.12.2
Forge: 14.23.3.2673
PneumaticCraft Repressurized: 0.6.2-179

When using the pneumatic helmet, with the block tracker installed, set to track rf blocks.
if you lock on to an RFTools powercell, that is linked with a card, you get the following crash:
https://pastebin.com/irxH3rsY

Starting posting it here, i can post it to the RFTools github as well if needed.

commented

This looks like an RFTools problem. PneumaticCraft is just getting the Forge energy handler capability from the null face of the power cell (which it succeeds in doing), and calling the standard IEnergyStorage#getEnergyStored() method on it. Nothing out of the ordinary.

You will need to take this one up with McJty, I think.

commented

One thing to note: the getEnergyStored() method is called client-side by the helmet rendering code. I would guess the powercell network code is all server side and not sync'd to the client, which is the likely cause of the problem. The clientside helmet code does make an attempt to get the server-side TE to send its NBT to the client, but looks like that's not enough in this case (actual power cell network data is stored outside the TE, at a guess).

At the least RFTools should check that generatorNetwork is not null at https://github.com/McJty/RFTools/blob/1.12/src/main/java/mcjty/rftools/blocks/powercell/PowerCellTileEntity.java#L155 - that would prevent the crash, although wouldn't provide the energy reading.

commented

This is now worked-around in dev; it won't crash, but the Powercell can't be read at this point.

MineMaarten and I have been discussing some ideas on general improvement of the data sync for the helmet HUD (making it more efficient, more general) which will properly resolve this, but that will be significant new development work.

commented

Fixed in 0.6.4 release