From bfb981cd49a6bbcd15482dceeb4ab121c0408157 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sun, 3 Jul 2022 23:12:06 -0300 Subject: [Project] Friend Code A Minecraft mod which adds friend codes, an easy way to play in the same world with remote friends. --- .../friendcode/mixin/FriendCodeIntegratedServerExt.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/java/ganarchy/friendcode/mixin/FriendCodeIntegratedServerExt.java (limited to 'src/main/java/ganarchy/friendcode/mixin/FriendCodeIntegratedServerExt.java') diff --git a/src/main/java/ganarchy/friendcode/mixin/FriendCodeIntegratedServerExt.java b/src/main/java/ganarchy/friendcode/mixin/FriendCodeIntegratedServerExt.java new file mode 100644 index 0000000..49d3b3f --- /dev/null +++ b/src/main/java/ganarchy/friendcode/mixin/FriendCodeIntegratedServerExt.java @@ -0,0 +1,17 @@ +package ganarchy.friendcode.mixin; + +import net.minecraft.client.network.LanServerPinger; +import net.minecraft.server.integrated.IntegratedServer; +import net.minecraft.world.GameMode; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(IntegratedServer.class) +public interface FriendCodeIntegratedServerExt { + @Accessor("forcedGameMode") + void forcedGameMode(GameMode gameMode); + @Accessor("lanPort") + void lanPort(int port); + @Accessor("lanPinger") + void lanPinger(LanServerPinger lanPinger); +} -- cgit 1.4.1