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:
Pilzinsel64 authored and GitHub committed 2023-02-10 22:23:59 +01:00
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