Skip to content

Commit

Permalink
1.0.7.5: add back null-checks in FogEffectHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
mist475 committed Jan 15, 2024
1 parent 464a2db commit d86cb2f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### DynamicSurroundings-1.7.10-1.0.7.4
**Fixes**
* Fix MAtmos startup crash due to mixin/AT clash
* Fix crash with non-default fog settings

### DynamicSurroundings-1.7.10-1.0.7.3
**What's New**
* Move all but one asm transformer to mixins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ public void fogColorEvent(final EntityViewRenderEvent.FogColors event) {
final Material material = event.block.getMaterial();
if (material != Material.lava && material != Material.water) {
final Color color = this.fogColor.calculate(event);
event.red = color.red;
event.green = color.green;
event.blue = color.blue;
//noinspection ConstantValue
if (color != null) {
event.red = color.red;
event.green = color.green;
event.blue = color.blue;
}
}
}
}
Expand All @@ -94,8 +97,11 @@ public void fogRenderEvent(final EntityViewRenderEvent.RenderFogEvent event) {
final Material material = event.block.getMaterial();
if (material != Material.lava && material != Material.water) {
final FogResult result = this.fogRange.calculate(event);
GL11.glFogf(GL11.GL_FOG_START, result.getStart());
GL11.glFogf(GL11.GL_FOG_END, result.getEnd());
//noinspection ConstantValue
if (result != null) {
GL11.glFogf(GL11.GL_FOG_START, result.getStart());
GL11.glFogf(GL11.GL_FOG_END, result.getEnd());
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion versions.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.10:1.0.7.3
1.7.10:1.0.7.4

0 comments on commit d86cb2f

Please sign in to comment.