EMC production stops while offline on server.
Naxanria opened this issue ยท 4 comments
Chunkloading makes no difference, the EMC production stops while user is offline.
Duplicate of #9?
I could trace the problem and have found that knowledgeProvider.setEmc() reacts different if the player is offline. Example:
Project-EX/src/main/java/com/latmod/mods/projectex/tile/TilePowerFlower.java Line 47
As long as the player is online this function works like you would assume. But if the player is offline the new EMC Value isn't set at all.
My work arount to this is to use an internal storage of the emc and add this value as soon as the player goes online. I've attached my "solution". Maybe someone with more knowledge has a better idea.
I have worked out a solution for this already and next update will fix this. I basically have my own map of player data and it allows to modify that and saves when world saves. Though I have to say, this suprised me, as the API is bit misleading, saying that player data is never null, I expected it to fully work in offlinemode. I will have to talk with PE devs about this