Add full brightness extra
This commit is contained in:
@@ -47,8 +47,6 @@ public class KeybindRegistry {
|
||||
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_PLAYER_OVERVIEW, Keyboard.KEY_B, "replaymod.title"));
|
||||
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_LIGHTING, Keyboard.KEY_Z, "replaymod.title"));
|
||||
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_ASSET_MANAGER, Keyboard.KEY_G, "replaymod.title"));
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_OBJECT_MANAGER, Keyboard.KEY_F, "replaymod.title"));
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package eu.crushedpixel.replaymod.registry;
|
||||
|
||||
import com.replaymod.core.ReplayMod;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.settings.GameSettings.Options;
|
||||
|
||||
public class LightingHandler {
|
||||
|
||||
//I've picked this value because it's very unlikely someone is going to set it manually
|
||||
private static final float AMBIENT_GAMMA = 1000;
|
||||
|
||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
private static float initialGamma = 0;
|
||||
|
||||
public static void setLighting(boolean lighting) {
|
||||
|
||||
float gamma = mc.gameSettings.getOptionFloatValue(Options.GAMMA);
|
||||
if(gamma != AMBIENT_GAMMA) {
|
||||
initialGamma = gamma;
|
||||
}
|
||||
|
||||
if(lighting) mc.gameSettings.setOptionFloatValue(Options.GAMMA, AMBIENT_GAMMA);
|
||||
else mc.gameSettings.setOptionFloatValue(Options.GAMMA, initialGamma);
|
||||
|
||||
if(ReplayMod.replaySender.paused()) {
|
||||
mc.entityRenderer.lightmapUpdateNeeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mc.gameSettings.gammaSetting = initialGamma;
|
||||
mc.gameSettings.saveOptions();
|
||||
}
|
||||
}, "lighting-handler-shutdown-hook"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user