Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-29 09:30:10 +01:00
Fix: disable bstats relocation on platforms where it is not needed
Dieser Commit ist enthalten in:
Ursprung
2ee488d995
Commit
a44edb3b62
@ -21,7 +21,7 @@ dependencies {
|
|||||||
shadow(projects.core) { isTransitive = false }
|
shadow(projects.core) { isTransitive = false }
|
||||||
includeTransitive(projects.core)
|
includeTransitive(projects.core)
|
||||||
|
|
||||||
// These are NOT transitively included, and instead shadowed + relocated.
|
// These are NOT transitively included, and instead shadowed (+ relocated, if not under the org.geyser namespace).
|
||||||
// Avoids fabric complaining about non-SemVer versioning
|
// Avoids fabric complaining about non-SemVer versioning
|
||||||
shadow(libs.protocol.connection) { isTransitive = false }
|
shadow(libs.protocol.connection) { isTransitive = false }
|
||||||
shadow(libs.protocol.common) { isTransitive = false }
|
shadow(libs.protocol.common) { isTransitive = false }
|
||||||
@ -46,8 +46,6 @@ tasks.withType<Jar> {
|
|||||||
|
|
||||||
relocate("org.cloudburstmc.netty")
|
relocate("org.cloudburstmc.netty")
|
||||||
relocate("org.cloudburstmc.protocol")
|
relocate("org.cloudburstmc.protocol")
|
||||||
relocate("com.github.steveice10.mc.auth")
|
|
||||||
platformRelocate("org.bstats")
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
remapJar {
|
remapJar {
|
||||||
|
@ -199,7 +199,6 @@ public abstract class GeyserModBootstrap implements GeyserBootstrap {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getServerPort() {
|
public int getServerPort() {
|
||||||
// TODO test
|
|
||||||
return ((GeyserServerPortGetter) server).geyser$getServerPort();
|
return ((GeyserServerPortGetter) server).geyser$getServerPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ public class IntegratedServerMixin implements GeyserServerPortGetter {
|
|||||||
GeyserLocale.loadGeyserLocale(this.minecraft.options.languageCode);
|
GeyserLocale.loadGeyserLocale(this.minecraft.options.languageCode);
|
||||||
// Give indication that Geyser is loaded
|
// Give indication that Geyser is loaded
|
||||||
Objects.requireNonNull(this.minecraft.player);
|
Objects.requireNonNull(this.minecraft.player);
|
||||||
this.minecraft.player.displayClientMessage(Component.literal(GeyserLocale.getPlayerLocaleString("geyser.core.start",
|
this.minecraft.player.displayClientMessage(Component.literal(GeyserLocale.getPlayerLocaleString("geyser.core.start.ip_suppressed",
|
||||||
this.minecraft.options.languageCode, "localhost", String.valueOf(GeyserImpl.getInstance().bedrockListener().port()))), false);
|
this.minecraft.options.languageCode, String.valueOf(GeyserImpl.getInstance().bedrockListener().port()))), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,8 +82,6 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
|
|||||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); // Can eat performance
|
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); // Can eat performance
|
||||||
}
|
}
|
||||||
|
|
||||||
System.setProperty("bstats.relocatecheck", "false");
|
|
||||||
|
|
||||||
GeyserStandaloneBootstrap bootstrap = new GeyserStandaloneBootstrap();
|
GeyserStandaloneBootstrap bootstrap = new GeyserStandaloneBootstrap();
|
||||||
// Set defaults
|
// Set defaults
|
||||||
boolean useGuiOpts = bootstrap.useGui;
|
boolean useGuiOpts = bootstrap.useGui;
|
||||||
|
@ -62,6 +62,9 @@ repositories {
|
|||||||
name = "viaversion"
|
name = "viaversion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MinecraftAuth
|
||||||
|
maven("https://maven.lenni0451.net/snapshots")
|
||||||
|
|
||||||
// Jitpack for e.g. MCPL
|
// Jitpack for e.g. MCPL
|
||||||
maven("https://jitpack.io") {
|
maven("https://jitpack.io") {
|
||||||
content { includeGroupByRegex("com\\.github\\..*") }
|
content { includeGroupByRegex("com\\.github\\..*") }
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
|
|
||||||
package org.geysermc.geyser.util.metrics;
|
package org.geysermc.geyser.util.metrics;
|
||||||
|
|
||||||
|
import org.geysermc.geyser.GeyserImpl;
|
||||||
|
import org.geysermc.geyser.api.util.PlatformType;
|
||||||
|
|
||||||
public interface MetricsPlatform {
|
public interface MetricsPlatform {
|
||||||
boolean enabled();
|
boolean enabled();
|
||||||
|
|
||||||
@ -35,4 +38,11 @@ public interface MetricsPlatform {
|
|||||||
boolean logSentData();
|
boolean logSentData();
|
||||||
|
|
||||||
boolean logResponseStatusText();
|
boolean logResponseStatusText();
|
||||||
|
|
||||||
|
default boolean disableRelocateCheck() {
|
||||||
|
PlatformType platformType = GeyserImpl.getInstance().platformType();
|
||||||
|
return platformType == PlatformType.FABRIC ||
|
||||||
|
platformType == PlatformType.NEOFORGE ||
|
||||||
|
platformType == PlatformType.STANDALONE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
base-api = "1.0.1"
|
base-api = "1.0.1"
|
||||||
bstats = "3.0.2"
|
bstats = "3.1.0"
|
||||||
cumulus = "1.1.2"
|
cumulus = "1.1.2"
|
||||||
configurate = "4.2.0-GeyserMC-SNAPSHOT"
|
configurate = "4.2.0-GeyserMC-SNAPSHOT"
|
||||||
erosion = "1.1-20240521.000109-3"
|
erosion = "1.1-20240521.000109-3"
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren