
Energy Trashcan NPE
hlanuel opened this issue ยท 2 comments
Hello,
We've got an issue on our server using the modpack All of Fabrics 6.
I accidentally used an Energy Trashcan instead of a basic trashcan. I used pipes to send items to the energy trashcan.
After the pipes received items the server was constantly crashing when loading the chunk where the trashcan is placed. We had no other choice than reload a backup.
Here is the error from the logs :
Caused by: java.lang.NullPointerException: Cannot invoke "team.reborn.energy.api.EnergyStorage.supportsExtraction()" because "stackEnergy" is null
at me.luligabi.coxinhautilities.common.block.trashcan.energy.EnergyTrashCanBlockEntity.tick(EnergyTrashCanBlockEntity.java:53) ~[coxinhautilities-1.4.5+1.19.jar:?]
if(stackEnergy != null & stackEnergy.supportsExtraction()) {
EnergyStorageUtil.move(stackEnergy, blockEntity.energyStorage, Long.MAX_VALUE, null);
}
We should have a && operator here