Skip to content

Commit

Permalink
Merge pull request #11 from GTNewHorizons/render-fixes
Browse files Browse the repository at this point in the history
Fixed some NullPointerExceptions
  • Loading branch information
Dream-Master authored Aug 18, 2022
2 parents eebc0c9 + 1f83d9e commit e9bcd33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
TileEntityAdvancedInfoPanelExtender advancedExtender = (TileEntityAdvancedInfoPanelExtender) tileEntity;
boolean wasRendered = false;

for (Screen screen : IC2NuclearControl.instance.screenManager.getScreens().get(
IC2NuclearControl.instance.screenManager.getWorldKey(advancedExtender.getWorldObj()))) {
if (screen.isBlockPartOf(advancedExtender)) {
wasRendered = true;
if (IC2NuclearControl.instance.screenManager != null) {
for (Screen screen : IC2NuclearControl.instance.screenManager.getScreens().get(
IC2NuclearControl.instance.screenManager.getWorldKey(advancedExtender.getWorldObj()))) {
if (screen != null && screen.isBlockPartOf(advancedExtender)) {
wasRendered = true;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,7 @@ public int modifyTextureIndex(int texture, int x, int y, int z) {
}
texture = I_PANEL_BACKGROUND;

if (colored) {
texture = texture + colorBackground * 16;
}
texture = texture + colorBackground * 16;

if (getPowered()) {
texture += 240;
Expand Down

0 comments on commit e9bcd33

Please sign in to comment.