Fix NPE when suffocating in ME Drives

And hopefully all other cases related to missing slot states
Closes #420
This commit is contained in:
NotMyWing
2024-05-17 19:08:18 +11:00
parent f28a3574df
commit e471293e60
@@ -60,6 +60,9 @@ public class DriveBakedModel implements IBakedModel {
}
DriveSlotsState slotsState = extState.getValue(BlockDrive.SLOTS_STATE);
if (slotsState == null) {
return result;
}
for (int row = 0; row < 5; row++) {
for (int col = 0; col < 2; col++) {
@@ -90,6 +93,7 @@ public class DriveBakedModel implements IBakedModel {
}
}
return result;
}