Commit a8f7265 1 parent dbd2627 commit a8f7265 Copy full SHA for a8f7265
File tree 4 files changed +23
-23
lines changed
java/dev/ithundxr/railwaystweaks/mixin
4 files changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ dependencies {
40
40
modImplementation(" dev.ithundxr.createnumismatics:CreateNumismatics-fabric-1.20.1:1.0.6+fabric-mc1.20.1" )
41
41
42
42
modCompileOnly(" maven.modrinth:copycats:fabric.1.20.1-1.3.2" )
43
-
44
- modCompileOnly(" maven.modrinth:appleskin:2.5.1+mc1.20" )
45
43
}
46
44
47
45
tasks.processResources {
Original file line number Diff line number Diff line change
1
+ package dev .ithundxr .railwaystweaks .mixin ;
2
+
3
+ import net .fabricmc .fabric .impl .event .interaction .FakePlayerNetworkHandler ;
4
+ import net .minecraft .server .level .ServerPlayer ;
5
+ import net .minecraft .server .network .ServerGamePacketListenerImpl ;
6
+ import org .spongepowered .asm .mixin .Mixin ;
7
+ import org .spongepowered .asm .mixin .Shadow ;
8
+ import org .spongepowered .asm .mixin .injection .At ;
9
+ import org .spongepowered .asm .mixin .injection .Inject ;
10
+ import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
11
+
12
+ @ Mixin (ServerPlayer .class )
13
+ public class ServerPlayerMixin {
14
+ @ Shadow public ServerGamePacketListenerImpl connection ;
15
+
16
+ @ Inject (method = "tick" , at = @ At ("HEAD" ))
17
+ private void railwaysTweaks$preventNullNetworkHandlerCrash (CallbackInfo ci ) {
18
+ if (connection == null )
19
+ connection = new FakePlayerNetworkHandler ((ServerPlayer ) (Object ) this );
20
+ }
21
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4
4
"package" : " dev.ithundxr.railwaystweaks.mixin" ,
5
5
"compatibilityLevel" : " JAVA_17" ,
6
6
"mixins" : [
7
+ " ServerPlayerMixin" ,
7
8
" LivingEntityMixin" ,
8
- " ServerStatusPacketListenerImplMixin" ,
9
- " compat.appleskin.SyncHandlerMixin"
9
+ " ServerStatusPacketListenerImplMixin"
10
10
],
11
11
"client" : [
12
12
" client.HttpTextureMixin" ,
You can’t perform that action at this time.
0 commit comments