Added setting to disable lighting

This commit is contained in:
Anuken
2023-09-02 11:49:34 -04:00
parent bff4097c88
commit 2e1b4934ad
4 changed files with 6 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ public class Renderer implements ApplicationListener{
public @Nullable Bloom bloom;
public @Nullable FrameBuffer backgroundBuffer;
public FrameBuffer effectBuffer = new FrameBuffer();
public boolean animateShields, drawWeather = true, drawStatus, enableEffects, drawDisplays = true;
public boolean animateShields, drawWeather = true, drawStatus, enableEffects, drawDisplays = true, drawLight = true;
public float weatherAlpha;
/** minZoom = zooming out, maxZoom = zooming in */
public float minZoom = 1.5f, maxZoom = 6f;
@@ -180,6 +180,7 @@ public class Renderer implements ApplicationListener{
drawStatus = settings.getBool("blockstatus");
enableEffects = settings.getBool("effects");
drawDisplays = !settings.getBool("hidedisplays");
drawLight = settings.getBool("drawlight", true);
if(landTime > 0){
if(!state.isPaused()){
@@ -337,7 +338,7 @@ public class Renderer implements ApplicationListener{
}
}
if(state.rules.lighting){
if(state.rules.lighting && drawLight){
Draw.draw(Layer.light, lights::draw);
}

View File

@@ -182,7 +182,7 @@ public class LightRenderer{
}
public boolean enabled(){
return state.rules.lighting && state.rules.ambientLight.a > 0.0001f;
return state.rules.lighting && state.rules.ambientLight.a > 0.0001f && renderer.drawLight;
}
public void draw(){

View File

@@ -440,6 +440,7 @@ public class SettingsMenuDialog extends BaseDialog{
graphics.checkPref("effects", true);
graphics.checkPref("atmosphere", !mobile);
graphics.checkPref("drawlight", true);
graphics.checkPref("destroyedblocks", true);
graphics.checkPref("blockstatus", false);
graphics.checkPref("playerchat", true);