mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-10-25 20:22:23 +00:00
Fix NullReferenceException at getCapacity->getBlockMetadata (#97)
* fix NullReferenceException on getBlockMetadata * oh no-no, please be static, it's your present! :)
This commit is contained in:
1 parent
29b0d711f7
commit
b5752a8338
1 file changed
+1
-1
@@ -99,7 +99,7 @@ public class SolarPanelNetwork {
|
||||
private static int getCapacity(TileEntitySolarPanel panel, int panelsCount) {
|
||||
int capacity = ENERGY_PER;
|
||||
|
||||
if (panel != null) {
|
||||
if (panel != null && panel.hasWorldObj()) {
|
||||
int meta = panel.getBlockMetadata();
|
||||
switch (meta) {
|
||||
case 0: // Default
|
||||
|
||||
Reference in new issue
Block a user