Update build files

This commit is contained in:
zontreck 2023-12-04 04:11:15 -07:00
parent 1b6f2106cb
commit fc03fecfb4

View file

@ -19,6 +19,8 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.locks.ReentrantLock;
import net.minecraft.hopper.Util;
import net.minecraft.launcher.Launcher;
import net.minecraft.launcher.MinecraftUserInterface;
import net.minecraft.launcher.game.MinecraftGameRunner;
@ -118,7 +120,7 @@ implements GameRunnerListener {
this.launcher.getLauncher().getVersionManager().getExecutorService().execute(new Runnable() {
@Override
public void run() {
gameRunner.setVisibility(Objects.firstNonNull(profile.getLauncherVisibilityOnGameClose(), Profile.DEFAULT_LAUNCHER_VISIBILITY));
gameRunner.setVisibility(Util.firstNonNull(profile.getLauncherVisibilityOnGameClose(), Profile.DEFAULT_LAUNCHER_VISIBILITY));
VersionSyncInfo syncInfo = null;
if (lastVersionId != null) {
syncInfo = GameLaunchDispatcher.this.launcher.getLauncher().getVersionManager().getVersionSyncInfo(
@ -164,11 +166,11 @@ implements GameRunnerListener {
public boolean isRunningInSameFolder() {
this.lock.lock();
try {
File currentGameDir = Objects.firstNonNull(this.launcher.getProfileManager().getSelectedProfile().getGameDir(), this.launcher.getLauncher().getWorkingDirectory());
File currentGameDir = Util.firstNonNull(this.launcher.getProfileManager().getSelectedProfile().getGameDir(), this.launcher.getLauncher().getWorkingDirectory());
for (MinecraftGameRunner runner : this.instances.values()) {
File otherGameDir;
Profile profile = runner.getSelectedProfile();
if (profile == null || !currentGameDir.equals(otherGameDir = Objects.firstNonNull(profile.getGameDir(), this.launcher.getLauncher().getWorkingDirectory()))) continue;
if (profile == null || !currentGameDir.equals(otherGameDir = Util.firstNonNull(profile.getGameDir(), this.launcher.getLauncher().getWorkingDirectory()))) continue;
boolean bl = true;
return bl;
}