Fixed potential crash in capacitor related logs

This commit is contained in:
Unknown 2018-07-23 21:52:07 +02:00 committed by unknown
parent 75f961cd98
commit 111dbcd6b6

View file

@ -162,9 +162,15 @@ public class TileEntityCapacitor extends TileEntityAbstractEnergy {
@Override @Override
public String toString() { public String toString() {
return String.format("%s %s %8d", if (enumTier == null) {
getClass().getSimpleName(), return String.format("%s %s",
Commons.format(world, pos), getClass().getSimpleName(),
energy_getEnergyStored()); Commons.format(world, pos));
} else {
return String.format("%s %s %8d",
getClass().getSimpleName(),
Commons.format(world, pos),
energy_getEnergyStored());
}
} }
} }