From 7d258e2c49e3b20e1baea1ee5afbc7f4631cb567 Mon Sep 17 00:00:00 2001 From: fzzyhmstrs <72876796+fzzyhmstrs@users.noreply.github.com> Date: Thu, 12 Sep 2024 08:44:11 -0400 Subject: [PATCH] update references to new payload/context ones, to avoid client world ref --- xplat/src/main/java/fzzyhmstrs/emi_loot/EMILoot.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xplat/src/main/java/fzzyhmstrs/emi_loot/EMILoot.java b/xplat/src/main/java/fzzyhmstrs/emi_loot/EMILoot.java index 7c930a56..62eb276b 100644 --- a/xplat/src/main/java/fzzyhmstrs/emi_loot/EMILoot.java +++ b/xplat/src/main/java/fzzyhmstrs/emi_loot/EMILoot.java @@ -70,11 +70,11 @@ public static Identifier identity(String path) { public static void onInitialize() { ConfigApi.INSTANCE.network().registerS2C(ClearPayload.TYPE, ClearPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.clearLoots()); - ConfigApi.INSTANCE.network().registerS2C(ChestLootPayload.TYPE, ChestLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveChestSender(payload.buf(), ctx.player().clientWorld)); - ConfigApi.INSTANCE.network().registerS2C(BlockLootPayload.TYPE, BlockLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveBlockSender(payload.buf(), ctx.player().clientWorld)); - ConfigApi.INSTANCE.network().registerS2C(MobLootPayload.TYPE, MobLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveMobSender(payload.buf(), ctx.player().clientWorld)); - ConfigApi.INSTANCE.network().registerS2C(GameplayLootPayload.TYPE, GameplayLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveGameplaySender(payload.buf(), ctx.player().clientWorld)); - ConfigApi.INSTANCE.network().registerS2C(ArchaeologyLootPayload.TYPE, ArchaeologyLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveArchaeologySender(payload.buf(), ctx.player().clientWorld)); + ConfigApi.INSTANCE.network().registerS2C(ChestLootPayload.TYPE, ChestLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveChestSender(payload, ctx)); + ConfigApi.INSTANCE.network().registerS2C(BlockLootPayload.TYPE, BlockLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveBlockSender(payload, ctx)); + ConfigApi.INSTANCE.network().registerS2C(MobLootPayload.TYPE, MobLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveMobSender(payload, ctx)); + ConfigApi.INSTANCE.network().registerS2C(GameplayLootPayload.TYPE, GameplayLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveGameplaySender(payload, ctx)); + ConfigApi.INSTANCE.network().registerS2C(ArchaeologyLootPayload.TYPE, ArchaeologyLootPayload.CODEC, (payload, ctx) -> ClientLootTables.INSTANCE.receiveArchaeologySender(payload, ctx)); } public static void parseTables(ResourceManager resourceManager, Registry lootManager, RegistryOps ops) { @@ -212,4 +212,4 @@ public enum Type { this.logUntranslatedTablesSupplier = logUntranslatedTablesSupplier; } } -} \ No newline at end of file +}