Fix NPE when suffocating in ME Drives
And hopefully all other cases related to missing slot states Closes #420
This commit is contained in:
@@ -60,6 +60,9 @@ public class DriveBakedModel implements IBakedModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DriveSlotsState slotsState = extState.getValue(BlockDrive.SLOTS_STATE);
|
DriveSlotsState slotsState = extState.getValue(BlockDrive.SLOTS_STATE);
|
||||||
|
if (slotsState == null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
for (int row = 0; row < 5; row++) {
|
for (int row = 0; row < 5; row++) {
|
||||||
for (int col = 0; col < 2; col++) {
|
for (int col = 0; col < 2; col++) {
|
||||||
@@ -90,6 +93,7 @@ public class DriveBakedModel implements IBakedModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user