Implemented review changes
This commit is contained in:
@@ -39,7 +39,7 @@ To access the **Replay Mod Settings** from the Main Menu click the **"Replay Vie
|
||||
While playing, you can click the 'Mods' button in the Pause screen to reach **Replay Mod Settings** if you use Minecraft 1.12.2 and below, or have the mod [Mod Menu](https://www.curseforge.com/minecraft/mc-mods/modmenu) installed.
|
||||
|
||||
When in a Replay, you can either bind a hotkey to the **Replay Mod Settings** in Minecraft's Control settings
|
||||
or use the hotkey GUI by clicking on the arrow button in the lower left corner.
|
||||
or use the hotkey GUI by clicking on the hamburger button in the lower left corner.
|
||||
|
||||
# Recording [recording]
|
||||

|
||||
|
||||
@@ -19,18 +19,11 @@ public class QuickMode extends EventRegistrations implements Extra {
|
||||
|
||||
private final IGuiImage indicator = new GuiImage().setTexture(ReplayMod.TEXTURE, 40, 100, 16, 16).setSize(16, 16);
|
||||
|
||||
private MinecraftClient mc;
|
||||
private boolean active;
|
||||
//#if MC>=11400
|
||||
private double originalGamma;
|
||||
//#else
|
||||
//$$ private float originalGamma;
|
||||
//#endif
|
||||
|
||||
@Override
|
||||
public void register(final ReplayMod mod) throws Exception {
|
||||
this.module = ReplayModReplay.instance;
|
||||
this.mc = mod.getMinecraft();
|
||||
|
||||
mod.getKeyBindingRegistry().registerKeyBinding("replaymod.input.quickmode", Keyboard.KEY_Q, new Runnable() {
|
||||
@Override
|
||||
@@ -39,15 +32,15 @@ public class QuickMode extends EventRegistrations implements Extra {
|
||||
if (replayHandler == null) {
|
||||
return;
|
||||
}
|
||||
active = !active;
|
||||
updateIndicator(replayHandler.getOverlay());
|
||||
replayHandler.getReplaySender().setSyncModeAndWait();
|
||||
mod.runLater(() ->
|
||||
replayHandler.ensureQuickModeInitialized(() -> {
|
||||
replayHandler.setQuickMode(active);
|
||||
replayHandler.getReplaySender().setAsyncMode(true);
|
||||
})
|
||||
);
|
||||
mod.runLater(() -> {
|
||||
replayHandler.ensureQuickModeInitialized(() -> {
|
||||
active = !active;
|
||||
replayHandler.setQuickMode(active);
|
||||
replayHandler.getReplaySender().setAsyncMode(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -60,7 +53,7 @@ public class QuickMode extends EventRegistrations implements Extra {
|
||||
|
||||
private void updateIndicator(GuiReplayOverlay overlay) {
|
||||
if (active) {
|
||||
overlay.statusIndicatorPanel.addElements(new HorizontalLayout.Data(2), indicator);
|
||||
overlay.statusIndicatorPanel.addElements(new HorizontalLayout.Data(1), indicator);
|
||||
} else {
|
||||
overlay.statusIndicatorPanel.removeElement(indicator);
|
||||
}
|
||||
|
||||
@@ -124,17 +124,6 @@ public class ReplayModReplay implements Module {
|
||||
}
|
||||
});
|
||||
|
||||
registry.registerKeyBinding("replaymod.input.quickmode", Keyboard.KEY_Q, () -> {
|
||||
if (replayHandler != null) {
|
||||
replayHandler.getReplaySender().setSyncModeAndWait();
|
||||
core.runLater(() ->
|
||||
replayHandler.ensureQuickModeInitialized(() -> {
|
||||
replayHandler.setQuickMode(!replayHandler.isQuickMode());
|
||||
replayHandler.getReplaySender().setAsyncMode(true);
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
core.getKeyBindingRegistry().registerKeyBinding("replaymod.input.rollclockwise", Keyboard.KEY_L, () -> {
|
||||
// Noop, actual handling logic in CameraEntity#update
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user