-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enough to get to the main menu
- Loading branch information
Showing
33 changed files
with
167 additions
and
189 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
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
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
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
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
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
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
19 changes: 19 additions & 0 deletions
19
...ent/java/net/fabricmc/fabric/mixin/networking/client/ClientCommonNetworkHandlerMixin.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,19 @@ | ||
package net.fabricmc.fabric.mixin.networking.client; | ||
|
||
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.callback.CallbackInfo; | ||
|
||
import net.minecraft.client.network.ClientCommonNetworkHandler; | ||
import net.minecraft.text.Text; | ||
|
||
import net.fabricmc.fabric.impl.networking.NetworkHandlerExtensions; | ||
|
||
@Mixin(ClientCommonNetworkHandler.class) | ||
public abstract class ClientCommonNetworkHandlerMixin implements NetworkHandlerExtensions { | ||
@Inject(method = "onDisconnected", at = @At("HEAD")) | ||
private void handleDisconnection(Text reason, CallbackInfo ci) { | ||
this.getAddon().handleDisconnect(); | ||
} | ||
} |
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
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
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
12 changes: 12 additions & 0 deletions
12
.../main/java/net/fabricmc/fabric/impl/networking/PacketByteBufLoginQueryRequestPayload.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,12 @@ | ||
package net.fabricmc.fabric.impl.networking; | ||
|
||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.network.packet.s2c.login.LoginQueryRequestPayload; | ||
import net.minecraft.util.Identifier; | ||
|
||
public record PacketByteBufLoginQueryRequestPayload(Identifier id, PacketByteBuf data) implements LoginQueryRequestPayload { | ||
@Override | ||
public void write(PacketByteBuf buf) { | ||
buf.writeBytes(this.data()); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...v1/src/main/java/net/fabricmc/fabric/impl/networking/PacketByteBufLoginQueryResponse.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,11 @@ | ||
package net.fabricmc.fabric.impl.networking; | ||
|
||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.network.packet.c2s.login.LoginQueryResponse; | ||
|
||
public record PacketByteBufLoginQueryResponse(PacketByteBuf data) implements LoginQueryResponse { | ||
@Override | ||
public void write(PacketByteBuf buf) { | ||
buf.writeBytes(this.data()); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...orking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/PacketByteBufPayload.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,12 @@ | ||
package net.fabricmc.fabric.impl.networking; | ||
|
||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.network.packet.CustomPayload; | ||
import net.minecraft.util.Identifier; | ||
|
||
public record PacketByteBufPayload(Identifier id, PacketByteBuf data) implements CustomPayload { | ||
@Override | ||
public void write(PacketByteBuf buf) { | ||
buf.writeBytes(this.data()); | ||
} | ||
} |
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
Oops, something went wrong.