Added Option to force load all chunks when rendering

Rewrote a lot of the Settings code
Started destroying the ReplayProcess, gonna fix that ASAP
This commit is contained in:
Marius Metzger
2015-04-06 11:00:32 +02:00
parent e7c2a462f3
commit e4d282bffe
15 changed files with 445 additions and 271 deletions

View File

@@ -1,16 +1,22 @@
package eu.crushedpixel.replaymod.events;
import org.lwjgl.input.Keyboard;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiYesNoCallback;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
import eu.crushedpixel.replaymod.ReplayMod;
import eu.crushedpixel.replaymod.entities.CameraEntity.MoveDirection;
import eu.crushedpixel.replaymod.gui.GuiCancelRender;
import eu.crushedpixel.replaymod.gui.elements.GuiMouseInput;
import eu.crushedpixel.replaymod.registry.KeybindRegistry;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.ReplayProcess;
import eu.crushedpixel.replaymod.replay.spectate.SpectateHandler;
import eu.crushedpixel.replaymod.video.ReplayScreenshot;
@@ -26,6 +32,12 @@ public class KeyInputHandler {
return;
}
if(Keyboard.getEventKeyState() && !Keyboard.isRepeatEvent() && Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)
&& ReplayHandler.isInPath() && ReplayProcess.isVideoRecording()
&& mc.currentScreen == null) {
mc.displayGuiScreen(new GuiCancelRender());
}
boolean found = false;
KeyBinding[] keyBindings = Minecraft.getMinecraft().gameSettings.keyBindings;
@@ -83,7 +95,8 @@ public class KeyInputHandler {
//Custom registered handlers
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_THUMBNAIL) && kb.isPressed() && !found) {
ReplayScreenshot.prepareScreenshot();
GuiReplayOverlay.requestScreenshot();
//GuiReplayOverlay.requestScreenshot();
//TODO: Make this properly work
}
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_SPECTATE) && kb.isPressed() && !found) {