mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 22:16:01 +00:00
Add advanced preferences
This commit is contained in:
1 parent
b0f4c0600f
commit
f783b57ee2
6 files changed
+28
-2
No files matched your search
@@ -83,6 +83,9 @@ public class FlashbackConfig {
|
||||
public String defaultExportFilename = "%date%T%time%";
|
||||
public InterpolationType defaultInterpolationType = InterpolationType.SMOOTH;
|
||||
|
||||
public boolean disableIncreasedFirstPersonUpdates = false;
|
||||
public boolean disableThirdPersonCancel = false;
|
||||
|
||||
public ReplaySorting replaySorting = ReplaySorting.CREATED_DATE;
|
||||
public boolean sortDescending = true;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ public class PreferencesWindow {
|
||||
ImString imString = ImGuiHelper.createResizableImString(config.defaultExportFilename);
|
||||
if (ImGui.inputText("Export Filename", imString)) {
|
||||
config.defaultExportFilename = ImGuiHelper.getString(imString);
|
||||
config.delayedSaveToDefaultFolder();
|
||||
}
|
||||
ImGuiHelper.tooltip("The default filename when exporting\nVariables:\n\t%date%\tyear-month-day\n\t%time%\thh_mm_ss\n\t%replay%\tReplay name\n\t%seq%\tExport count for this session");
|
||||
|
||||
@@ -57,6 +58,19 @@ public class PreferencesWindow {
|
||||
config.defaultInterpolationType = ImGuiHelper.enumCombo("Default Interpolation", config.defaultInterpolationType);
|
||||
|
||||
ImGuiHelper.endPopupModalCloseable();
|
||||
|
||||
if (ImGui.collapsingHeader("Advanced")) {
|
||||
ImGui.textWrapped("Don't change any of these unless you know what you're doing");
|
||||
ImGui.textWrapped("If you change one of these and then ask for support you will be made fun of");
|
||||
if (ImGui.checkbox("Disable increased first-person updates", config.disableIncreasedFirstPersonUpdates)) {
|
||||
config.disableIncreasedFirstPersonUpdates = !config.disableIncreasedFirstPersonUpdates;
|
||||
config.delayedSaveToDefaultFolder();
|
||||
}
|
||||
if (ImGui.checkbox("Disable third-person cancel", config.disableThirdPersonCancel)) {
|
||||
config.disableThirdPersonCancel = !config.disableThirdPersonCancel;
|
||||
config.delayedSaveToDefaultFolder();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wasOpen && !ImGui.isPopupOpen("###Preferences")) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.moulberry.flashback.Flashback;
|
||||
import com.moulberry.flashback.FreezeSlowdownFormula;
|
||||
import com.moulberry.flashback.configuration.FlashbackConfig;
|
||||
import com.moulberry.flashback.editor.ui.windows.ExportDoneWindow;
|
||||
import com.moulberry.flashback.editor.ui.windows.WindowType;
|
||||
import com.moulberry.flashback.exporting.ExportJob;
|
||||
@@ -214,7 +215,8 @@ public abstract class MixinMinecraft implements MinecraftExt {
|
||||
}
|
||||
}
|
||||
|
||||
if (inReplay) {
|
||||
FlashbackConfig config = Flashback.getConfig();
|
||||
if (inReplay && !config.disableThirdPersonCancel) {
|
||||
// Force camera type to first person
|
||||
if (this.player != null && this.cameraEntity == this.player && this.options.getCameraType() != CameraType.FIRST_PERSON) {
|
||||
this.options.setCameraType(CameraType.FIRST_PERSON);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.mojang.authlib.GameProfile;
|
||||
import com.moulberry.flashback.Flashback;
|
||||
import com.moulberry.flashback.PacketHelper;
|
||||
import com.moulberry.flashback.SneakyThrow;
|
||||
import com.moulberry.flashback.configuration.FlashbackConfig;
|
||||
import com.moulberry.flashback.ext.LevelChunkExt;
|
||||
import com.moulberry.flashback.TempFolderProvider;
|
||||
import com.moulberry.flashback.keyframe.handler.ReplayServerKeyframeHandler;
|
||||
@@ -605,6 +606,11 @@ public class ReplayServer extends IntegratedServer {
|
||||
}
|
||||
|
||||
public void handleAccuratePlayerPosition(RegistryFriendlyByteBuf friendlyByteBuf) {
|
||||
FlashbackConfig config = Flashback.getConfig();
|
||||
if (config.disableIncreasedFirstPersonUpdates) {
|
||||
return;
|
||||
}
|
||||
|
||||
var packet = FlashbackAccurateEntityPosition.STREAM_CODEC.decode(friendlyByteBuf);
|
||||
|
||||
for (ReplayPlayer replayViewer : this.replayViewers) {
|
||||
|
||||
Reference in new issue
Block a user