Fix placing a diode on the world border (#1094)
* Fix placing a diode on the world border * 〃
This commit is contained in:
committed by
Anuken
parent
7955b82b1e
commit
48911005aa
@@ -51,7 +51,7 @@ public class PowerDiode extends Block{
|
||||
|
||||
// battery % of the graph on either side, defaults to zero
|
||||
protected float bar(Tile tile){
|
||||
return tile.block().hasPower ? tile.entity.power.graph.getBatteryStored() / tile.entity.power.graph.getTotalBatteryCapacity() : 0f;
|
||||
return (tile != null && tile.block().hasPower) ? tile.entity.power.graph.getBatteryStored() / tile.entity.power.graph.getTotalBatteryCapacity() : 0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user