Minecraft 1.21.5

Co-authored-by: Ven <[email protected]>
Co-authored-by: Jonathing <[email protected]>
This commit is contained in:
committed 2025-03-26 16:34:26 -07:00
1 parent 88904a1d09
commit d50a3b5ab7
548 files changed
+5432 -7867

No files matched your search

@@ -1,16 +1,16 @@
--- a/net/minecraft/client/Options.java
+++ b/net/minecraft/client/Options.java
@@ -698,7 +_,8 @@
@@ -668,7 +_,8 @@
},
new OptionInstance.LazyEnum<>(
() -> Stream.concat(Stream.of(""), Minecraft.getInstance().getSoundManager().getAvailableSoundDevices().stream()).toList(),
- p_232011_ -> Minecraft.getInstance().isRunning() && p_232011_ != "" && !Minecraft.getInstance().getSoundManager().getAvailableSoundDevices().contains(p_232011_)
+ // FORGE: fix incorrect string comparison - PR #8767
+ p_232011_ -> Minecraft.getInstance().isRunning() && (p_232011_ == null || !p_232011_.isEmpty()) && !Minecraft.getInstance().getSoundManager().getAvailableSoundDevices().contains(p_232011_)
? Optional.empty()
: Optional.of(p_232011_),
? Optional.empty()
: Optional.of(p_232011_),
Codec.STRING
@@ -1079,6 +_,7 @@
@@ -1050,6 +_,7 @@
}
public Options(Minecraft p_92138_, File p_92139_) {
@@ -18,10 +18,10 @@
this.minecraft = p_92138_;
this.optionsFile = new File(p_92139_, "options.txt");
boolean flag = Runtime.getRuntime().maxMemory() >= 1000000000L;
@@ -1210,12 +_,22 @@
p_168428_.process("telemetryOptInExtra", this.telemetryOptInExtra);
@@ -1181,12 +_,22 @@
this.onboardAccessibility = p_168428_.process("onboardAccessibility", this.onboardAccessibility);
p_168428_.process("menuBackgroundBlurriness", this.menuBackgroundBlurriness);
this.startedCleanly = p_168428_.process("startedCleanly", this.startedCleanly);
+ processOptionsForge(p_168428_);
+ }
@@ -42,7 +42,7 @@
}
}
@@ -1233,6 +_,10 @@
@@ -1204,6 +_,10 @@
}
public void load() {
@@ -53,8 +53,8 @@
try {
if (!this.optionsFile.exists()) {
return;
@@ -1260,7 +_,8 @@
}
@@ -1228,7 +_,8 @@
this.graphicsMode.set(isTrue(optional.get()) ? GraphicsStatus.FANCY : GraphicsStatus.FAST);
}
- this.processOptions(
@@ -62,8 +62,8 @@
+ processor.accept(
new Options.FieldAccess() {
@Nullable
private String getValueOrNull(String p_168459_) {
@@ -1451,6 +_,7 @@
private String getValue(String p_394210_) {
@@ -1433,6 +_,7 @@
}
public void broadcastOptions() {
@@ -71,7 +71,7 @@
if (this.minecraft.player != null) {
this.minecraft.player.connection.broadcastClientInformation(this.buildPlayerInformation());
}
@@ -1564,6 +_,23 @@
@@ -1546,6 +_,23 @@
public static Component genericValueLabel(Component p_231901_, int p_231902_) {
return genericValueLabel(p_231901_, Component.literal(Integer.toString(p_231902_)));