Skip to content

Commit

Permalink
Create renderblock when null checks fail
Browse files Browse the repository at this point in the history
  • Loading branch information
FourIsTheNumber committed Sep 7, 2024
1 parent 3d71f69 commit d6d2e80
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aTick % 20 == 0) {
if (blackHoleStatus == 2) {
if (blackHoleStability >= 0) {
if (rendererTileEntity != null) rendererTileEntity.setStability(blackHoleStability / 100F);
if (rendererTileEntity == null) createRenderBlock();
rendererTileEntity.setStability(blackHoleStability / 100F);
float stabilityDecrease = 1F;
// If the machine is running, reduce stability loss by 25%
if (this.maxProgresstime() != 0) {
Expand All @@ -536,7 +537,8 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
break;
}
}
if (rendererTileEntity != null) rendererTileEntity.toggleLaser(didDrain);
if (rendererTileEntity == null) createRenderBlock();
rendererTileEntity.toggleLaser(didDrain);
if (blackHoleStability >= 0) blackHoleStability -= stabilityDecrease;
else blackHoleStability = 0;
} else blackHoleStatus = 3;
Expand Down

0 comments on commit d6d2e80

Please sign in to comment.