mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
New config used in core
This commit is contained in:
parent
db9b951352
commit
29f8e294ad
66 changed files with 758 additions and 1045 deletions
|
@ -96,7 +96,7 @@ public class GeyserModInjector extends GeyserInjector {
|
|||
int index = ch.pipeline().names().indexOf("encoder");
|
||||
String baseName = index != -1 ? "encoder" : "outbound_config";
|
||||
|
||||
if (bootstrap.getGeyserConfig().isDisableCompression()) {
|
||||
if (bootstrap.config().asPluginConfig().orElseThrow().disableCompression()) {
|
||||
ch.pipeline().addAfter(baseName, "geyser-compression-disabler", new GeyserModCompressionDisabler());
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class GeyserModInjector extends GeyserInjector {
|
|||
childHandler = (ChannelInitializer<Channel>) childHandlerField.get(handler);
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
if (bootstrap.getGeyserConfig().isDebugMode()) {
|
||||
if (bootstrap.config().debugMode()) {
|
||||
bootstrap.getGeyserLogger().debug("The handler " + name + " isn't a ChannelInitializer. THIS ERROR IS SAFE TO IGNORE!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ public class IntegratedServerMixin implements GeyserServerPortGetter {
|
|||
// If the LAN is opened, starts Geyser.
|
||||
GeyserModBootstrap instance = GeyserModBootstrap.getInstance();
|
||||
instance.setServer((MinecraftServer) (Object) this);
|
||||
instance.getGeyserConfig().getRemote().setPort(port);
|
||||
instance.onGeyserEnable();
|
||||
// Ensure player locale has been loaded, in case it's different from Java system language
|
||||
GeyserLocale.loadGeyserLocale(this.minecraft.options.languageCode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue