File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
java/me/senseiwells/replay/mixin/rejoin Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ dependencies {
38
38
// I've had some issues with ReplayStudio and slf4j (in dev)
39
39
// Simplest workaround that I've found is just to unzip the
40
40
// jar and yeet the org.slf4j packages then rezip the jar.
41
- modImplementation(" com.github.ReplayMod:ReplayStudio:6cd39b0874" ) {
41
+ include( modImplementation(" com.github.ReplayMod:ReplayStudio:6cd39b0874" ) {
42
42
exclude(group = " org.slf4j" )
43
43
exclude(group = " com.google.guava" , module = " guava-jdk5" )
44
44
exclude(group = " com.google.guava" , module = " guava" )
45
45
exclude(group = " com.google.code.gson" , module = " gson" )
46
- }
46
+ })
47
47
include(modImplementation(" net.fabricmc:fabric-language-kotlin:${property(" fabric_kotlin_version" )} " )!! )
48
48
include(modImplementation(" me.lucko:fabric-permissions-api:${property(" permissions_version" )} " )!! )
49
49
Original file line number Diff line number Diff line change
1
+ package me .senseiwells .replay .mixin .rejoin ;
2
+
3
+ import com .llamalad7 .mixinextras .injector .WrapWithCondition ;
4
+ import me .senseiwells .replay .rejoin .RejoinedReplayPlayer ;
5
+ import net .minecraft .server .level .ServerPlayer ;
6
+ import net .minecraft .server .players .PlayerList ;
7
+ import org .spongepowered .asm .mixin .Mixin ;
8
+ import org .spongepowered .asm .mixin .injection .At ;
9
+
10
+ @ Mixin (ServerPlayer .class )
11
+ public class ServerPlayerMixin {
12
+ @ WrapWithCondition (
13
+ method = "<init>" ,
14
+ at = @ At (
15
+ value = "INVOKE" ,
16
+ target = "Lnet/minecraft/server/players/PlayerList;getPlayerAdvancements(Lnet/minecraft/server/level/ServerPlayer;)Lnet/minecraft/server/PlayerAdvancements;"
17
+ )
18
+ )
19
+ private boolean shouldUpdateAdvancements (PlayerList instance , ServerPlayer player ) {
20
+ return !(player instanceof RejoinedReplayPlayer );
21
+ }
22
+ }
Original file line number Diff line number Diff line change 17
17
" rejoin.ChunkMapMixin" ,
18
18
" rejoin.ConnectionAccessor" ,
19
19
" rejoin.ServerConfigurationPacketListenerImplAccessor" ,
20
+ " rejoin.ServerPlayerMixin" ,
20
21
" rejoin.TrackedEntityAccessor" ,
21
22
" rejoin.TrackedEntityMixin" ,
22
23
" studio.ZipReplayFileAccessor"
You can’t perform that action at this time.
0 commit comments