Introduce minimal mode (allows RM to run on unsupported MC versions)

by disabling various version-specific features (i.e. everything which
requires the ReplayStudio).
This commit is contained in:
Jonas Herzig
2019-06-20 16:50:33 +02:00
parent 357501e5db
commit af55951f42
13 changed files with 195 additions and 36 deletions

View File

@@ -314,6 +314,7 @@ public class ReplayHandler {
//#if MC>=10904
public void ensureQuickModeInitialized(Runnable andThen) {
if (Utils.ifMinimalModeDoPopup(overlay, () -> {})) return;
ListenableFuture<Void> future = quickReplaySender.getInitializationPromise();
if (future == null) {
InitializingQuickModePopup popup = new InitializingQuickModePopup(overlay);
@@ -365,6 +366,9 @@ public class ReplayHandler {
}
public void setQuickMode(boolean quickMode) {
if (ReplayMod.isMinimalMode()) {
throw new UnsupportedOperationException("Quick Mode not supported in minimal mode.");
}
if (quickMode == this.quickMode) return;
if (quickMode && fullReplaySender.isAsyncMode()) {
// If this method is called via runLater, then it cannot switch to sync mode by itself as there might be