
[1.19.2][kubejsprojecte-1.2] setPlayerEMC does the same as addPlayerEMC
MrNovado opened this issue ยท 2 comments
A typo?
public void setPlayerEMC(Player player, String num) {
if (player == null) return;
var cap = player.getCapability(PECapabilities.KNOWLEDGE_CAPABILITY);
if (cap.isPresent()) {
var emc = cap.resolve().get();
emc.setEmc(emc.getEmc().add(new BigDecimal(num).toBigInteger()));
}
}
// gets current and then adds `num` on top
emc.setEmc(emc.getEmc().add(new BigDecimal(num).toBigInteger()));
Also, transmutation_table
does not update its emc
balance after setting/adding emc through KubeJS.
Meaning, it displays old emc balance until a transaction is made (buying/selling an item).
Any chance projectE
has some sort of refresh
method to push after setting emc
?