Skip to content

Commit

Permalink
Minecraft 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
LexManos committed Dec 5, 2024
1 parent e643d0a commit 041084d
Show file tree
Hide file tree
Showing 219 changed files with 1,825 additions and 2,605 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
package net.minecraftforge.fml.loading;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class BackgroundWaiter {
private static final ExecutorService runner = Executors.newSingleThreadExecutor();

public static void runAndTick(Runnable r, Runnable tick) {
var runner = Executors.newSingleThreadExecutor();
ImmediateWindowHandler.updateProgress("Loading bootstrap resources");
final Future<?> work = runner.submit(r);
do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ protected ServiceRunner makeService(final String[] arguments, final ModuleLayer

protected record LaunchType(String name, String module, String main, Dist dist, boolean data) {};
protected static final LaunchType CLIENT = new LaunchType("client", "minecraft", "net.minecraft.client.main.Main", Dist.CLIENT, false);
protected static final LaunchType CLIENT_DATA = new LaunchType("client_data", "minecraft", "net.minecraft.client.data.Main", Dist.CLIENT, true);
protected static final LaunchType DATA = new LaunchType("data", "minecraft", "net.minecraft.data.Main", Dist.CLIENT, true);
protected static final LaunchType SERVER = new LaunchType("server", "minecraft", "net.minecraft.server.Main", Dist.DEDICATED_SERVER, false);
protected static final LaunchType SERVER_GAMETEST = new LaunchType("server_gametest", "net.minecraftforge.forge", "net.minecraftforge.gametest.GameTestMain", Dist.DEDICATED_SERVER, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public Client() {
}
}

public static final class ClientData extends ForgeDevLaunchHandler {
public ClientData() {
super(CLIENT_DATA);
}
}

public static final class Data extends ForgeDevLaunchHandler {
public Data() {
super(DATA);
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ org.gradle.daemon=false
org.gradle.parallel=true

JAVA_VERSION=21
MC_VERSION=1.21.3
MC_VERSION=1.21.4
MC_NEXT_VERSION=1.22
MCP_VERSION=20241025.112443
MCP_VERSION=20241203.143248
MAPPING_CHANNEL=official
MAPPING_VERSION=1.21.3
MAPPING_VERSION=1.21.4

// Set to true before the first build of a new MC version, so we don't do compatibility checks
CHECK_COMPATIBILITY=false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/com/mojang/blaze3d/platform/Window.java
+++ b/com/mojang/blaze3d/platform/Window.java
@@ -88,7 +_,8 @@
@@ -89,7 +_,8 @@
GLFW.glfwWindowHint(139267, 2);
GLFW.glfwWindowHint(139272, 204801);
GLFW.glfwWindowHint(139270, 1);
Expand All @@ -10,15 +10,15 @@
if (monitor != null) {
VideoMode videomode = monitor.getPreferredVidMode(this.fullscreen ? this.preferredFullscreenVideoMode : Optional.empty());
this.windowedX = this.x = monitor.getX() + videomode.getWidth() / 2 - this.width / 2;
@@ -100,6 +_,7 @@
@@ -101,6 +_,7 @@
this.windowedX = this.x = aint1[0];
this.windowedY = this.y = aint[0];
}
+ }

GLFW.glfwMakeContextCurrent(this.window);
GL.createCapabilities();
@@ -267,6 +_,9 @@
@@ -271,6 +_,9 @@
GLFW.glfwGetFramebufferSize(this.window, aint, aint1);
this.framebufferWidth = aint[0] > 0 ? aint[0] : 1;
this.framebufferHeight = aint1[0] > 0 ? aint1[0] : 1;
Expand Down
2 changes: 1 addition & 1 deletion patches/minecraft/net/minecraft/Util.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/Util.java
+++ b/net/minecraft/Util.java
@@ -264,7 +_,7 @@
@@ -268,7 +_,7 @@
.getSchema(DataFixUtils.makeKey(SharedConstants.getCurrentVersion().getDataVersion().getVersion()))
.getChoiceType(p_137552_, p_137553_);
} catch (IllegalArgumentException illegalargumentexception) {
Expand Down
20 changes: 10 additions & 10 deletions patches/minecraft/net/minecraft/client/KeyMapping.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/KeyMapping.java
+++ b/net/minecraft/client/KeyMapping.java
@@ -14,9 +_,9 @@
@@ -15,9 +_,9 @@
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
Expand All @@ -12,7 +12,7 @@
private static final Set<String> CATEGORIES = Sets.newHashSet();
public static final String CATEGORY_MOVEMENT = "key.categories.movement";
public static final String CATEGORY_MISC = "key.categories.misc";
@@ -42,14 +_,14 @@
@@ -43,14 +_,14 @@
private int clickCount;

public static void click(InputConstants.Key p_90836_) {
Expand All @@ -29,7 +29,7 @@
if (keymapping != null) {
keymapping.setDown(p_90839_);
}
@@ -100,7 +_,7 @@
@@ -101,7 +_,7 @@
}

public boolean isDown() {
Expand All @@ -38,7 +38,7 @@
}

public String getCategory() {
@@ -136,7 +_,16 @@
@@ -137,7 +_,16 @@
public int compareTo(KeyMapping p_90841_) {
return this.category.equals(p_90841_.category)
? I18n.get(this.name).compareTo(I18n.get(p_90841_.name))
Expand All @@ -56,7 +56,7 @@
}

public static Supplier<Component> createNameSupplier(String p_90843_) {
@@ -145,6 +_,20 @@
@@ -146,6 +_,20 @@
}

public boolean same(KeyMapping p_90851_) {
Expand All @@ -77,7 +77,7 @@
return this.key.equals(p_90851_.key);
}

@@ -163,11 +_,13 @@
@@ -164,11 +_,13 @@
}

public Component getTranslatedKeyMessage() {
Expand All @@ -92,10 +92,10 @@
}

public String saveString() {
@@ -176,5 +_,88 @@

public void setDown(boolean p_90846_) {
this.isDown = p_90846_;
@@ -182,5 +_,88 @@
@Nullable
public static KeyMapping get(String p_378660_) {
return ALL.get(p_378660_);
+ }
+
+ private net.minecraftforge.client.settings.KeyModifier keyModifierDefault = net.minecraftforge.client.settings.KeyModifier.NONE;
Expand Down
Loading

0 comments on commit 041084d

Please sign in to comment.