Fixed potential crash in capacitor related logs
This commit is contained in:
parent
75f961cd98
commit
111dbcd6b6
1 changed files with 10 additions and 4 deletions
|
@ -162,9 +162,15 @@ public class TileEntityCapacitor extends TileEntityAbstractEnergy {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s %s %8d",
|
||||
getClass().getSimpleName(),
|
||||
Commons.format(world, pos),
|
||||
energy_getEnergyStored());
|
||||
if (enumTier == null) {
|
||||
return String.format("%s %s",
|
||||
getClass().getSimpleName(),
|
||||
Commons.format(world, pos));
|
||||
} else {
|
||||
return String.format("%s %s %8d",
|
||||
getClass().getSimpleName(),
|
||||
Commons.format(world, pos),
|
||||
energy_getEnergyStored());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue