Skip to content

Commit

Permalink
fix remove fabric api
Browse files Browse the repository at this point in the history
  • Loading branch information
a3510377 committed Nov 5, 2023
1 parent a939bde commit 17b0b85
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ dependencies {
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "carpet:fabric-carpet:${project.minecraft_version}-${project.carpet_core_version}"

implementation "io.prometheus:prometheus-metrics-core:${project.prometheus_version}"
Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ org.gradle.parallel=true
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.65
loader_version=0.14.24
# check available versions on maven (https://masa.dy.fi/maven/carpet/fabric-carpet/) for the given minecraft version you are using
carpet_core_version=1.4.57+v220119
# https://github.com/prometheus/client_java
prometheus_version=1.0.0
# Mod Properties
mod_version=1.1.0
maven_group=monkey.info.command
archives_base_name=info-command
# Dependencies
fabric_version=0.46.1+1.17
## check available versions on maven (https://masa.dy.fi/maven/carpet/fabric-carpet/) for the given minecraft version you are using
carpet_core_version=1.4.57+v220119
3 changes: 1 addition & 2 deletions src/main/java/monkey/info/command/InfoCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import monkey.info.command.metrics.Tick;
import monkey.info.command.utils.CarpetExtraTranslations;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.command.ServerCommandSource;
import org.apache.logging.log4j.LogManager;
Expand All @@ -28,7 +27,6 @@ public InfoCommand() {
@Override
public void onInitialize() {
CarpetServer.manageExtension(new InfoCommand());
ServerLifecycleEvents.SERVER_STARTING.register(server -> InfoCommand.server = server);
}

@Override
Expand All @@ -38,6 +36,7 @@ public void registerCommands(CommandDispatcher<ServerCommandSource> dispatcher)

@Override
public void onServerLoaded(MinecraftServer server) {
InfoCommand.server = server;
this.prometheus.start();
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/monkey/info/command/Prometheus.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public void start() {
@Override
public void run() {
if (InfoCommand.server == null || !InfoCommandSettings.prometheusEnable) return;
InfoCommand.LOGGER.info("tick");

for (Metric metric : getMetrics()) {
try {
Expand Down

0 comments on commit 17b0b85

Please sign in to comment.