mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Update for Java 1.19 and Geyser 2.0.4-SNAPSHOT (#53)
* Update for 1.19 and 2.0.4-SNAPSHOT * Use mod version in Geyser dependency
This commit is contained in:
parent
4b4529c590
commit
2a89eab100
6 changed files with 18 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.10-SNAPSHOT'
|
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||||
id 'java'
|
id 'java'
|
||||||
|
@ -27,8 +27,8 @@ dependencies {
|
||||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||||
// You may need to force-disable transitiveness on them.
|
// You may need to force-disable transitiveness on them.
|
||||||
|
|
||||||
implementation 'org.geysermc:core:2.0.3-SNAPSHOT'
|
implementation "org.geysermc:core:${project.mod_version}"
|
||||||
shadow('org.geysermc:core:2.0.3-SNAPSHOT') {
|
shadow("org.geysermc:core:${project.mod_version}") {
|
||||||
exclude group: 'com.google.guava', module: "guava"
|
exclude group: 'com.google.guava', module: "guava"
|
||||||
exclude group: 'com.google.code.gson', module: "gson"
|
exclude group: 'com.google.code.gson', module: "gson"
|
||||||
exclude group: 'org.slf4j'
|
exclude group: 'org.slf4j'
|
||||||
|
@ -93,7 +93,7 @@ jar {
|
||||||
|
|
||||||
remapJar {
|
remapJar {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
input.set shadowJar.archiveFile.get()
|
input = tasks.shadowJar.archiveFile
|
||||||
}
|
}
|
||||||
|
|
||||||
// configure the maven publication
|
// configure the maven publication
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.18.2
|
minecraft_version=1.19
|
||||||
yarn_mappings=1.18.2+build.1
|
yarn_mappings=1.19+build.1
|
||||||
loader_version=0.12.8
|
loader_version=0.14.6
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=2.0.3-SNAPSHOT
|
mod_version=2.0.4-SNAPSHOT
|
||||||
maven_group=org.geysermc.platform
|
maven_group=org.geysermc.platform
|
||||||
archives_base_name=Geyser-Fabric
|
archives_base_name=Geyser-Fabric
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# check this on https://modmuss50.me/fabric.html
|
# check this on https://modmuss50.me/fabric.html
|
||||||
fabric_version=0.43.1+1.18
|
fabric_version=0.55.2+1.19
|
|
@ -27,7 +27,7 @@ package org.geysermc.platform.fabric.command;
|
||||||
|
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.text.LiteralText;
|
import net.minecraft.text.Text;
|
||||||
import org.geysermc.geyser.GeyserImpl;
|
import org.geysermc.geyser.GeyserImpl;
|
||||||
import org.geysermc.geyser.command.CommandSender;
|
import org.geysermc.geyser.command.CommandSender;
|
||||||
import org.geysermc.geyser.text.ChatColor;
|
import org.geysermc.geyser.text.ChatColor;
|
||||||
|
@ -49,7 +49,7 @@ public class FabricCommandSender implements CommandSender {
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(String message) {
|
public void sendMessage(String message) {
|
||||||
if (source.getEntity() instanceof ServerPlayerEntity) {
|
if (source.getEntity() instanceof ServerPlayerEntity) {
|
||||||
((ServerPlayerEntity) source.getEntity()).sendMessage(new LiteralText(message), false);
|
((ServerPlayerEntity) source.getEntity()).sendMessage(Text.literal(message), false);
|
||||||
} else {
|
} else {
|
||||||
GeyserImpl.getInstance().getLogger().info(ChatColor.toANSI(message + ChatColor.RESET));
|
GeyserImpl.getInstance().getLogger().info(ChatColor.toANSI(message + ChatColor.RESET));
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.integrated.IntegratedServer;
|
import net.minecraft.server.integrated.IntegratedServer;
|
||||||
import net.minecraft.text.LiteralText;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.world.GameMode;
|
import net.minecraft.world.GameMode;
|
||||||
import org.geysermc.geyser.text.GeyserLocale;
|
import org.geysermc.geyser.text.GeyserLocale;
|
||||||
import org.geysermc.platform.fabric.GeyserFabricMod;
|
import org.geysermc.platform.fabric.GeyserFabricMod;
|
||||||
|
@ -58,7 +58,7 @@ public class IntegratedServerMixin implements GeyserServerPortGetter {
|
||||||
// Ensure player locale has been loaded, in case it's different from Java system language
|
// Ensure player locale has been loaded, in case it's different from Java system language
|
||||||
GeyserLocale.loadGeyserLocale(this.client.options.language);
|
GeyserLocale.loadGeyserLocale(this.client.options.language);
|
||||||
// Give indication that Geyser is loaded
|
// Give indication that Geyser is loaded
|
||||||
this.client.player.sendMessage(new LiteralText(GeyserLocale.getPlayerLocaleString("geyser.core.start",
|
this.client.player.sendMessage(Text.literal(GeyserLocale.getPlayerLocaleString("geyser.core.start",
|
||||||
this.client.options.language, "localhost", String.valueOf(this.lanPort))), false);
|
this.client.options.language, "localhost", String.valueOf(this.lanPort))), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,27 +25,23 @@
|
||||||
|
|
||||||
package org.geysermc.platform.fabric.mixin.server;
|
package org.geysermc.platform.fabric.mixin.server;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfileRepository;
|
|
||||||
import com.mojang.authlib.minecraft.MinecraftSessionService;
|
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import net.minecraft.resource.ResourcePackManager;
|
import net.minecraft.resource.ResourcePackManager;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.SaveLoader;
|
import net.minecraft.server.SaveLoader;
|
||||||
import net.minecraft.server.WorldGenerationProgressListenerFactory;
|
import net.minecraft.server.WorldGenerationProgressListenerFactory;
|
||||||
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
|
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
|
||||||
import net.minecraft.util.UserCache;
|
import net.minecraft.util.ApiServices;
|
||||||
import net.minecraft.world.level.storage.LevelStorage;
|
import net.minecraft.world.level.storage.LevelStorage;
|
||||||
import org.geysermc.platform.fabric.GeyserServerPortGetter;
|
import org.geysermc.platform.fabric.GeyserServerPortGetter;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
|
|
||||||
@Mixin(MinecraftDedicatedServer.class)
|
@Mixin(MinecraftDedicatedServer.class)
|
||||||
public abstract class MinecraftDedicatedServerMixin extends MinecraftServer implements GeyserServerPortGetter {
|
public abstract class MinecraftDedicatedServerMixin extends MinecraftServer implements GeyserServerPortGetter {
|
||||||
// Constructor to compile
|
public MinecraftDedicatedServerMixin(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager, SaveLoader saveLoader, Proxy proxy, DataFixer dataFixer, ApiServices apiServices, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) {
|
||||||
public MinecraftDedicatedServerMixin(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager, SaveLoader saveLoader, Proxy proxy, DataFixer dataFixer, @Nullable MinecraftSessionService sessionService, @Nullable GameProfileRepository gameProfileRepo, @Nullable UserCache userCache, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) {
|
super(serverThread, session, dataPackManager, saveLoader, proxy, dataFixer, apiServices, worldGenerationProgressListenerFactory);
|
||||||
super(serverThread, session, dataPackManager, saveLoader, proxy, dataFixer, sessionService, gameProfileRepo, userCache, worldGenerationProgressListenerFactory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.11.3",
|
"fabricloader": ">=0.11.3",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": ">=1.18.2"
|
"minecraft": ">=1.19"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue