Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
UnifiedMetrics
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lipras
UnifiedMetrics
Commits
70c288d0
Unverified
Commit
70c288d0
authored
3 years ago
by
DJtheRedstoner
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(fabric): tps/mspt on 1.18-pre1 (#46)
parent
745c5f8a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platforms/fabric/src/main/java/dev/cubxity/plugins/metrics/fabric/mixins/MinecraftServerMixin.java
+2
-14
2 additions, 14 deletions
...y/plugins/metrics/fabric/mixins/MinecraftServerMixin.java
with
2 additions
and
14 deletions
platforms/fabric/src/main/java/dev/cubxity/plugins/metrics/fabric/mixins/MinecraftServerMixin.java
+
2
−
14
View file @
70c288d0
...
...
@@ -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
"
,
t
arg
et
=
"
Lnet/minecraft/util/profiler/Profiler;pop()V
"
value
=
"
CONSTANT
"
,
arg
s
=
"
stringValue=tallying
"
)
)
private
void
onTickEnd
(
CallbackInfo
ci
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment