1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Update/fix bootstraps, target new mappings

This commit is contained in:
Eclipse
2025-09-30 17:39:41 +00:00
parent bdabf6b20e
commit 3612d9cf9b
9 changed files with 18 additions and 19 deletions

View File

@@ -23,8 +23,8 @@
"geyser.mixins.json"
],
"depends": {
"fabricloader": ">=0.16.7",
"fabricloader": ">=0.17.2",
"fabric-api": "*",
"minecraft": ">=1.21.6"
"minecraft": ">=1.21.9"
}
}

View File

@@ -111,7 +111,7 @@ public class GeyserNeoForgeBootstrap extends GeyserModBootstrap {
@Override
public boolean isServer() {
return FMLLoader.getDist().isDedicatedServer();
return FMLLoader.getCurrent().getDist().isDedicatedServer();
}
private void onPermissionGather(PermissionGatherEvent.Nodes event) {

View File

@@ -54,10 +54,10 @@ public class GeyserNeoForgeDumpInfo extends BootstrapDumpInfo {
private final List<ModInfo> mods;
public GeyserNeoForgeDumpInfo(MinecraftServer server) {
this.platformName = FMLLoader.launcherHandlerName();
this.platformVersion = FMLLoader.versionInfo().neoForgeVersion();
this.minecraftVersion = FMLLoader.versionInfo().mcVersion();
this.dist = FMLLoader.getDist();
this.platformName = /*FMLLoader.getCurrent().launcherHandlerName()*/""; // TODO 1.21.9 FIXME
this.platformVersion = FMLLoader.getCurrent().getVersionInfo().neoForgeVersion();
this.minecraftVersion = FMLLoader.getCurrent().getVersionInfo().mcVersion();
this.dist = FMLLoader.getCurrent().getDist();
this.serverIP = server.getLocalIp() == null ? "unknown" : server.getLocalIp();
this.serverPort = server.getPort();
this.onlineMode = server.usesAuthentication();
@@ -81,4 +81,4 @@ public class GeyserNeoForgeDumpInfo extends BootstrapDumpInfo {
public String version;
public String url;
}
}
}

View File

@@ -82,8 +82,7 @@ public class GeyserNeoForgePlatform implements GeyserModPlatform {
@Override
public @Nullable InputStream resolveResource(@NonNull String resource) {
try {
Path path = container.getModInfo().getOwningFile().getFile().findResource(resource);
return Files.newInputStream(path);
return container.getModInfo().getOwningFile().getFile().getContents().openFile(resource); // TODO test 1.21.9
} catch (IOException e) {
return null;
}

View File

@@ -71,7 +71,7 @@ public class PermissionUtils {
case FALSE -> false;
case NOT_SET -> {
if (player != null) {
yield player.createCommandSourceStack().hasPermission(Objects.requireNonNull(player.getServer()).getOperatorUserPermissionLevel());
yield player.createCommandSourceStack().hasPermission(Objects.requireNonNull(player.level()).getServer().operatorUserPermissionLevel());
}
yield false; // NeoForge javadocs say player is null in the case of an offline player.
}

View File

@@ -16,12 +16,12 @@ config = "geyser_neoforge.mixins.json"
[[dependencies.geyser_neoforge]]
modId="neoforge"
type="required"
versionRange="[21.6.0-beta,)"
versionRange="[21.9.0-beta,)"
ordering="NONE"
side="BOTH"
[[dependencies.geyser_neoforge]]
modId="minecraft"
type="required"
versionRange="[1.21.6,)"
versionRange="[1.21.9,)"
ordering="NONE"
side="BOTH"