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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
if (enumTier == null) {
|
||||||
|
return String.format("%s %s",
|
||||||
|
getClass().getSimpleName(),
|
||||||
|
Commons.format(world, pos));
|
||||||
|
} else {
|
||||||
return String.format("%s %s %8d",
|
return String.format("%s %s %8d",
|
||||||
getClass().getSimpleName(),
|
getClass().getSimpleName(),
|
||||||
Commons.format(world, pos),
|
Commons.format(world, pos),
|
||||||
energy_getEnergyStored());
|
energy_getEnergyStored());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue