-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/dev/ithundxr/railwaystweaks/mixin/ServerPlayerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dev.ithundxr.railwaystweaks.mixin; | ||
|
||
import net.fabricmc.fabric.impl.event.interaction.FakePlayerNetworkHandler; | ||
import net.minecraft.server.level.ServerPlayer; | ||
import net.minecraft.server.network.ServerGamePacketListenerImpl; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(ServerPlayer.class) | ||
public class ServerPlayerMixin { | ||
@Shadow public ServerGamePacketListenerImpl connection; | ||
|
||
@Inject(method = "tick", at = @At("HEAD")) | ||
private void railwaysTweaks$preventNullNetworkHandlerCrash(CallbackInfo ci) { | ||
if (connection == null) | ||
connection = new FakePlayerNetworkHandler((ServerPlayer) (Object) this); | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
src/main/java/dev/ithundxr/railwaystweaks/mixin/compat/appleskin/SyncHandlerMixin.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters