Skip to content
Snippets Groups Projects
Unverified Commit 70c288d0 authored by DJtheRedstoner's avatar DJtheRedstoner Committed by GitHub
Browse files

fix(fabric): tps/mspt on 1.18-pre1 (#46)

parent 745c5f8a
No related branches found
No related tags found
No related merge requests found
......@@ -19,11 +19,9 @@ package dev.cubxity.plugins.metrics.fabric.mixins;
import dev.cubxity.plugins.metrics.fabric.events.TickEvent;
import net.minecraft.server.MinecraftServer;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Slice;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import static dev.cubxity.plugins.metrics.api.metric.collector.CollectorKt.NANOSECONDS_PER_MILLISECOND;
......@@ -59,19 +57,9 @@ public class MinecraftServerMixin {
@Inject(
method = "tick",
slice = @Slice(
from = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/snooper/Snooper;update()V"
),
to = @At(
value = "FIELD",
target = "Lnet/minecraft/server/MinecraftServer;lastTickLengths:[J"
)
),
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/profiler/Profiler;pop()V"
value = "CONSTANT",
args = "stringValue=tallying"
)
)
private void onTickEnd(CallbackInfo ci) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment