mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-02 14:38:50 +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
+1
-1
@@ -62,7 +62,7 @@ dependencies {
|
|||||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
include(implementation("com.moulberry:mixinconstraints:1.0.5"))
|
include(implementation("com.moulberry:mixinconstraints:1.0.6"))
|
||||||
|
|
||||||
modCompileOnly(rootProject.files('deps/DistantHorizons-2.3.0-b-RC3-1.21.4-neoforge-fabric.jar'))
|
modCompileOnly(rootProject.files('deps/DistantHorizons-2.3.0-b-RC3-1.21.4-neoforge-fabric.jar'))
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ public class FlashbackConfig {
|
|||||||
public String defaultExportFilename = "%date%T%time%";
|
public String defaultExportFilename = "%date%T%time%";
|
||||||
public InterpolationType defaultInterpolationType = InterpolationType.SMOOTH;
|
public InterpolationType defaultInterpolationType = InterpolationType.SMOOTH;
|
||||||
|
|
||||||
|
public boolean disableIncreasedFirstPersonUpdates = false;
|
||||||
|
public boolean disableThirdPersonCancel = false;
|
||||||
|
|
||||||
public ReplaySorting replaySorting = ReplaySorting.CREATED_DATE;
|
public ReplaySorting replaySorting = ReplaySorting.CREATED_DATE;
|
||||||
public boolean sortDescending = true;
|
public boolean sortDescending = true;
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class PreferencesWindow {
|
|||||||
ImString imString = ImGuiHelper.createResizableImString(config.defaultExportFilename);
|
ImString imString = ImGuiHelper.createResizableImString(config.defaultExportFilename);
|
||||||
if (ImGui.inputText("Export Filename", imString)) {
|
if (ImGui.inputText("Export Filename", imString)) {
|
||||||
config.defaultExportFilename = ImGuiHelper.getString(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");
|
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);
|
config.defaultInterpolationType = ImGuiHelper.enumCombo("Default Interpolation", config.defaultInterpolationType);
|
||||||
|
|
||||||
ImGuiHelper.endPopupModalCloseable();
|
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")) {
|
if (wasOpen && !ImGui.isPopupOpen("###Preferences")) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
|||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.moulberry.flashback.Flashback;
|
import com.moulberry.flashback.Flashback;
|
||||||
import com.moulberry.flashback.FreezeSlowdownFormula;
|
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.ExportDoneWindow;
|
||||||
import com.moulberry.flashback.editor.ui.windows.WindowType;
|
import com.moulberry.flashback.editor.ui.windows.WindowType;
|
||||||
import com.moulberry.flashback.exporting.ExportJob;
|
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
|
// Force camera type to first person
|
||||||
if (this.player != null && this.cameraEntity == this.player && this.options.getCameraType() != CameraType.FIRST_PERSON) {
|
if (this.player != null && this.cameraEntity == this.player && this.options.getCameraType() != CameraType.FIRST_PERSON) {
|
||||||
this.options.setCameraType(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.Flashback;
|
||||||
import com.moulberry.flashback.PacketHelper;
|
import com.moulberry.flashback.PacketHelper;
|
||||||
import com.moulberry.flashback.SneakyThrow;
|
import com.moulberry.flashback.SneakyThrow;
|
||||||
|
import com.moulberry.flashback.configuration.FlashbackConfig;
|
||||||
import com.moulberry.flashback.ext.LevelChunkExt;
|
import com.moulberry.flashback.ext.LevelChunkExt;
|
||||||
import com.moulberry.flashback.TempFolderProvider;
|
import com.moulberry.flashback.TempFolderProvider;
|
||||||
import com.moulberry.flashback.keyframe.handler.ReplayServerKeyframeHandler;
|
import com.moulberry.flashback.keyframe.handler.ReplayServerKeyframeHandler;
|
||||||
@@ -605,6 +606,11 @@ public class ReplayServer extends IntegratedServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleAccuratePlayerPosition(RegistryFriendlyByteBuf friendlyByteBuf) {
|
public void handleAccuratePlayerPosition(RegistryFriendlyByteBuf friendlyByteBuf) {
|
||||||
|
FlashbackConfig config = Flashback.getConfig();
|
||||||
|
if (config.disableIncreasedFirstPersonUpdates) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var packet = FlashbackAccurateEntityPosition.STREAM_CODEC.decode(friendlyByteBuf);
|
var packet = FlashbackAccurateEntityPosition.STREAM_CODEC.decode(friendlyByteBuf);
|
||||||
|
|
||||||
for (ReplayPlayer replayViewer : this.replayViewers) {
|
for (ReplayPlayer replayViewer : this.replayViewers) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "com.moulberry.flashback.mixin",
|
"package": "com.moulberry.flashback.mixin",
|
||||||
|
"plugin": "com.moulberry.mixinconstraints.ConstraintsMixinPlugin",
|
||||||
"compatibilityLevel": "JAVA_21",
|
"compatibilityLevel": "JAVA_21",
|
||||||
"client": [
|
"client": [
|
||||||
"MixinAbstractClientPlayer",
|
"MixinAbstractClientPlayer",
|
||||||
|
|||||||
Reference in new issue
Block a user