Heat And Climate

Heat And Climate

409k Downloads

TileFluidProcessorBase showing wrong fluids in server

Snownee opened this issue ยท 7 comments

commented

I poured milk in a steel pot and then got oil on gui.

commented

Fluid ID is managed by an external file in the config folder. This is used for communication between the server and client, so it will be displayed incorrectly if there is a discrepancy between the server and client.
There is currently no plan to fix this.

commented

Could you please tell me why there are Fluid IDs? Why not serializing FluidStack directly?

commented

The GUI progress bar (IInventory# get/setField) needs a numeric ID. These do not correspond to handling FluidStack directly.
When I ported this feature from AMT2, the numeric ID was already removed, so I made it myself. That's all.

commented

OK I got that. I think you do not have to implement IInventory. if you implement IInventory, you do not have to make every data in field.

commented

What does that mean?
Many machines in this mod have an inventory. (Of course it needs to handle ItemStack and Slot.) This looks like unrealistic advice. Or is it just ironic?

commented

No. Just overriding getCapability and hasCapability can implement all the logics.

commented

Capability is not a feature for server-client communication. They require a another communication method.
(Field of IInventory is a communication function between GUI-Container compatible with ICraftig of old version. It is different.)
Well, there are other ways to send and receive NBT while the player is opening the GUI. Anyway. I may consider it.