Skip to content

Commit

Permalink
We're not using LibGui's networking function anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
zbx1425 committed Dec 27, 2024
1 parent 1f11830 commit 4a107cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public <D> void send(Identifier message, Encoder<D> encoder, D data) {
}

public static void init() {
PayloadTypeRegistry.playS2C().register(ScreenMessage.ID, ScreenMessage.CODEC);
PayloadTypeRegistry.playC2S().register(ScreenMessage.ID, ScreenMessage.CODEC);
ServerPlayNetworking.registerGlobalReceiver(ScreenMessage.ID, (payload, context) -> {
handle(context.player().server, context.player(), payload);
});
// PayloadTypeRegistry.playS2C().register(ScreenMessage.ID, ScreenMessage.CODEC);
// PayloadTypeRegistry.playC2S().register(ScreenMessage.ID, ScreenMessage.CODEC);
// ServerPlayNetworking.registerGlobalReceiver(ScreenMessage.ID, (payload, context) -> {
// handle(context.player().server, context.player(), payload);
// });
}

public static void handle(Executor executor, PlayerEntity player, ScreenMessage packet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public class LibGuiClient {
public void onInitializeClient() {
config = loadConfig();

ClientPlayNetworking.registerGlobalReceiver(ScreenNetworkingImpl.ScreenMessage.ID, (payload, context) -> {
ScreenNetworkingImpl.handle(context.client(), context.player(), payload);
});
// ClientPlayNetworking.registerGlobalReceiver(ScreenNetworkingImpl.ScreenMessage.ID, (payload, context) -> {
// ScreenNetworkingImpl.handle(context.client(), context.player(), payload);
// });

LibGuiShaders.register();
Proxy.proxy = new ClientProxy();
Expand Down

0 comments on commit 4a107cc

Please sign in to comment.