mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
837c259668 | ||
|
|
2e48910b4c | ||
|
|
70dd556db6 | ||
|
|
e44a558f37 |
No files matched your search
+1
-1
@@ -84,7 +84,7 @@ public abstract class CommonLaunchHandler implements ILaunchHandlerService {
|
|||||||
protected static final LaunchType CLIENT_DATA = new LaunchType("client_data", "minecraft", "net.minecraft.client.data.Main", Dist.CLIENT, true);
|
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 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 = 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);
|
protected static final LaunchType SERVER_GAMETEST = new LaunchType("server_gametest", "minecraft", "net.minecraft.gametest.Main", Dist.DEDICATED_SERVER, false);
|
||||||
|
|
||||||
protected void runTarget(String module, String target, final String[] arguments, final ModuleLayer layer) throws Throwable {
|
protected void runTarget(String module, String target, final String[] arguments, final ModuleLayer layer) throws Throwable {
|
||||||
var mod = layer.findModule(module).orElse(null);
|
var mod = layer.findModule(module).orElse(null);
|
||||||
|
|||||||
@@ -96,14 +96,14 @@ public final class ForgeDevLocator extends AbstractModProvider implements IModLo
|
|||||||
|
|
||||||
// Find resource directories for every mod in this group
|
// Find resource directories for every mod in this group
|
||||||
var paths = new LinkedHashSet<Path>();
|
var paths = new LinkedHashSet<Path>();
|
||||||
for (var modid : modids) {
|
for (var modid : modids.stream().sorted().toList()) {
|
||||||
var rsc = path.resolve(modid);
|
var rsc = path.resolve(modid);
|
||||||
if (Files.exists(rsc))
|
if (Files.exists(rsc))
|
||||||
paths.add(rsc);
|
paths.add(rsc);
|
||||||
}
|
}
|
||||||
|
|
||||||
var root = memory.getPath(modids.iterator().next()); // use the first modid as our root
|
var root = memory.getPath(modids.iterator().next()); // use the first modid as our root
|
||||||
buildModsToml(paths, modids, root);
|
buildModsToml(paths, modids, root, pkg.startsWith("net/minecraftforge/debug/client/"));
|
||||||
buildPackMeta(paths, root);
|
buildPackMeta(paths, root);
|
||||||
moveModuleInfo(paths, root);
|
moveModuleInfo(paths, root);
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ public final class ForgeDevLocator extends AbstractModProvider implements IModLo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Builds or update the mods.toml file for all @Mods in this package
|
// Builds or update the mods.toml file for all @Mods in this package
|
||||||
private static void buildModsToml(Set<Path> resources, Set<String> modids, Path root) {
|
private static void buildModsToml(Set<Path> resources, Set<String> modids, Path root, boolean clientOnly) {
|
||||||
var toml = resources.stream()
|
var toml = resources.stream()
|
||||||
.map(p -> p.resolve(MODS_TOML))
|
.map(p -> p.resolve(MODS_TOML))
|
||||||
.filter(Files::exists)
|
.filter(Files::exists)
|
||||||
@@ -205,7 +205,8 @@ public final class ForgeDevLocator extends AbstractModProvider implements IModLo
|
|||||||
var defaults = Map.of(
|
var defaults = Map.of(
|
||||||
"modLoader", "javafml",
|
"modLoader", "javafml",
|
||||||
"loaderVersion", "[0,)",
|
"loaderVersion", "[0,)",
|
||||||
"license", "Doesnt fucking matter"
|
"license", "Doesnt fucking matter",
|
||||||
|
"clientSideOnly", clientOnly
|
||||||
);
|
);
|
||||||
|
|
||||||
for (var key : defaults.keySet()) {
|
for (var key : defaults.keySet()) {
|
||||||
|
|||||||
+3
-3
@@ -5,11 +5,11 @@ org.gradle.daemon=false
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
JAVA_VERSION=21
|
JAVA_VERSION=21
|
||||||
MC_VERSION=1.21.7
|
MC_VERSION=1.21.8
|
||||||
MC_NEXT_VERSION=1.22
|
MC_NEXT_VERSION=1.22
|
||||||
MCP_VERSION=20250630.104312
|
MCP_VERSION=20250717.105350
|
||||||
MAPPING_CHANNEL=official
|
MAPPING_CHANNEL=official
|
||||||
MAPPING_VERSION=1.21.7
|
MAPPING_VERSION=1.21.8
|
||||||
|
|
||||||
# Set to true before the first build of a new MC version, so we don't do compatibility checks
|
# Set to true before the first build of a new MC version, so we don't do compatibility checks
|
||||||
CHECK_COMPATIBILITY=false
|
CHECK_COMPATIBILITY=false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--- a/com/mojang/blaze3d/vertex/VertexFormat.java
|
--- a/com/mojang/blaze3d/vertex/VertexFormat.java
|
||||||
+++ b/com/mojang/blaze3d/vertex/VertexFormat.java
|
+++ b/com/mojang/blaze3d/vertex/VertexFormat.java
|
||||||
@@ -20,7 +_,7 @@
|
@@ -21,7 +_,7 @@
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
public static final int UNKNOWN_ELEMENT = -1;
|
public static final int UNKNOWN_ELEMENT = -1;
|
||||||
private static final boolean USE_STAGING_BUFFER_WORKAROUND = Util.getPlatform() == Util.OS.WINDOWS && Util.isAarch64();
|
private static final boolean USE_STAGING_BUFFER_WORKAROUND = Util.getPlatform() == Util.OS.WINDOWS && Util.isAarch64();
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -34,6 +_,7 @@
|
@@ -35,6 +_,7 @@
|
||||||
private GpuBuffer immediateDrawVertexBuffer;
|
private GpuBuffer immediateDrawVertexBuffer;
|
||||||
@Nullable
|
@Nullable
|
||||||
private GpuBuffer immediateDrawIndexBuffer;
|
private GpuBuffer immediateDrawIndexBuffer;
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
VertexFormat(List<VertexFormatElement> p_343616_, List<String> p_345241_, IntList p_345522_, int p_344162_) {
|
VertexFormat(List<VertexFormatElement> p_343616_, List<String> p_345241_, IntList p_345522_, int p_344162_) {
|
||||||
this.elements = p_343616_;
|
this.elements = p_343616_;
|
||||||
@@ -46,6 +_,11 @@
|
@@ -47,6 +_,11 @@
|
||||||
int j = vertexformatelement != null ? p_343616_.indexOf(vertexformatelement) : -1;
|
int j = vertexformatelement != null ? p_343616_.indexOf(vertexformatelement) : -1;
|
||||||
this.offsetsByElement[i] = j != -1 ? p_345522_.getInt(j) : -1;
|
this.offsetsByElement[i] = j != -1 ? p_345522_.getInt(j) : -1;
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static VertexFormat.Builder builder() {
|
public static VertexFormat.Builder builder() {
|
||||||
@@ -162,6 +_,9 @@
|
@@ -169,6 +_,9 @@
|
||||||
);
|
);
|
||||||
return this.immediateDrawIndexBuffer;
|
return this.immediateDrawIndexBuffer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/gametest/Main.java
|
||||||
|
+++ b/net/minecraft/gametest/Main.java
|
||||||
|
@@ -7,6 +_,8 @@
|
||||||
|
public class Main {
|
||||||
|
@DontObfuscate
|
||||||
|
public static void main(String[] p_393417_) throws Exception {
|
||||||
|
+ System.setProperty("forge.enableGameTest", "true");
|
||||||
|
+ System.setProperty("forge.gameTestServer", "true");
|
||||||
|
SharedConstants.tryDetectVersion();
|
||||||
|
GameTestMainUtil.runGameTestServer(p_393417_, p_393535_ -> {});
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
--- a/net/minecraft/gametest/framework/GameTestMainUtil.java
|
||||||
|
+++ b/net/minecraft/gametest/framework/GameTestMainUtil.java
|
||||||
|
@@ -69,6 +_,7 @@
|
||||||
|
|
||||||
|
Bootstrap.bootStrap();
|
||||||
|
Util.startTimerHackThread();
|
||||||
|
+ net.minecraftforge.server.loading.ServerModLoader.load();
|
||||||
|
String s = optionset.valueOf(universe);
|
||||||
|
createOrResetDir(s);
|
||||||
|
p_393652_.accept(s);
|
||||||
@@ -78,7 +78,7 @@ public class LoadingErrorScreen extends ErrorScreen {
|
|||||||
|
|
||||||
private void drawMultiLineCenteredString(GuiGraphics guiGraphics, Font fr, Component str, int x, int y) {
|
private void drawMultiLineCenteredString(GuiGraphics guiGraphics, Font fr, Component str, int x, int y) {
|
||||||
for (FormattedCharSequence s : fr.split(str, this.width)) {
|
for (FormattedCharSequence s : fr.split(str, this.width)) {
|
||||||
guiGraphics.drawString(fr, s, x - fr.width(s) / 2, y, 0xFFFFFF);
|
guiGraphics.drawString(fr, s, x - fr.width(s) / 2, y, 0xFFFFFFFF);
|
||||||
y += fr.lineHeight;
|
y += fr.lineHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -134,9 +134,9 @@ public class LoadingErrorScreen extends ErrorScreen {
|
|||||||
int y = top + 2;
|
int y = top + 2;
|
||||||
for (var string : strings) {
|
for (var string : strings) {
|
||||||
if (center)
|
if (center)
|
||||||
guiGraphics.drawString(font, string, left + (width / 2) - (font.width(string) / 2), y, 0xFFFFFF, false);
|
guiGraphics.drawString(font, string, left + (width / 2) - (font.width(string) / 2), y, 0xFFFFFFFF, false);
|
||||||
else
|
else
|
||||||
guiGraphics.drawString(font, string, left + 5, y, 0xFFFFFF, false);
|
guiGraphics.drawString(font, string, left + 5, y, 0xFFFFFFFF, false);
|
||||||
y += font.lineHeight;
|
y += font.lineHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import net.minecraftforge.fml.loading.StringUtils;
|
|||||||
import net.minecraftforge.forgespi.language.IModInfo;
|
import net.minecraftforge.forgespi.language.IModInfo;
|
||||||
|
|
||||||
import net.minecraft.locale.Language;
|
import net.minecraft.locale.Language;
|
||||||
|
import net.minecraft.network.chat.ClickEvent;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.Style;
|
import net.minecraft.network.chat.Style;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -499,4 +500,12 @@ public class ModListScreen extends Screen {
|
|||||||
public void onClose() {
|
public void onClose() {
|
||||||
this.minecraft.setScreen(this.parentScreen);
|
this.minecraft.setScreen(this.parentScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleClickEvent(Minecraft mc, ClickEvent event) {
|
||||||
|
if (mc.player == null)
|
||||||
|
defaultHandleClickEvent(event, mc, this);
|
||||||
|
else
|
||||||
|
defaultHandleGameClickEvent(event, mc, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Forge Development LLC and contributors
|
|
||||||
* SPDX-License-Identifier: LGPL-2.1-only
|
|
||||||
*/
|
|
||||||
|
|
||||||
package net.minecraftforge.gametest;
|
|
||||||
|
|
||||||
import net.minecraft.server.Main;
|
|
||||||
|
|
||||||
public class GameTestMain {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.setProperty("forge.enableGameTest", "true");
|
|
||||||
System.setProperty("forge.gameTestServer", "true");
|
|
||||||
Main.main(args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
clientSideOnly=true
|
|
||||||
Reference in new issue
Block a user