Skip to content

Commit

Permalink
fix 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fzzyhmstrs committed Sep 12, 2024
1 parent 4051f3c commit e667390
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions xplat/src/main/java/fzzyhmstrs/emi_loot/EMILoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public static Identifier identity(String path) {

public static void onInitialize() {
ConfigApi.INSTANCE.network().registerS2C(LootTableParser.CLEAR_LOOTS, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, LootTableParser.CLEAR_LOOTS), (payload, ctx) -> ClientLootTables.INSTANCE.clearLoots());
ConfigApi.INSTANCE.network().registerS2C(ChestLootTableSender.CHEST_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, ChestLootTableSender.CHEST_SENDER), (payload, ctx) -> ClientLootTables.INSTANCE.receiveChestSender(payload.buf()));
ConfigApi.INSTANCE.network().registerS2C(BlockLootTableSender.BLOCK_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, BlockLootTableSender.BLOCK_SENDER), (payload, ctx) -> ClientLootTables.INSTANCE.receiveBlockSender(payload.buf()));
ConfigApi.INSTANCE.network().registerS2C(MobLootTableSender.MOB_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, MobLootTableSender.MOB_SENDER), (payload, ctx) -> ClientLootTables.INSTANCE.receiveMobSender(payload.buf()));
ConfigApi.INSTANCE.network().registerS2C(GameplayLootTableSender.GAMEPLAY_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, GameplayLootTableSender.GAMEPLAY_SENDER), (payload, ctx) -> ClientLootTables.INSTANCE.receiveGameplaySender(payload.buf()));
ConfigApi.INSTANCE.network().registerS2C(ArchaeologyLootTableSender.ARCHAEOLOGY_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, ArchaeologyLootTableSender.ARCHAEOLOGY_SENDER), (payload, ctx) -> ClientLootTables.INSTANCE.receiveArchaeologySender(payload.buf()));
ConfigApi.INSTANCE.network().registerS2C(ChestLootTableSender.CHEST_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, ChestLootTableSender.CHEST_SENDER), ClientLootTablesReceiver::receiveChestSender);
ConfigApi.INSTANCE.network().registerS2C(BlockLootTableSender.BLOCK_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, BlockLootTableSender.BLOCK_SENDER), ClientLootTablesReceiver::receiveBlockSender);
ConfigApi.INSTANCE.network().registerS2C(MobLootTableSender.MOB_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, MobLootTableSender.MOB_SENDER), ClientLootTablesReceiver::receiveMobSender);
ConfigApi.INSTANCE.network().registerS2C(GameplayLootTableSender.GAMEPLAY_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, GameplayLootTableSender.GAMEPLAY_SENDER), ClientLootTablesReceiver::receiveGameplaySender);
ConfigApi.INSTANCE.network().registerS2C(ArchaeologyLootTableSender.ARCHAEOLOGY_SENDER, SimpleFzzyPayload.class, buf -> new SimpleFzzyPayload(buf, ArchaeologyLootTableSender.ARCHAEOLOGY_SENDER), ClientLootTablesReceiver::receiveArchaeologySender);

//Registry.register(Registries.ENCHANTMENT, new Identifier(MOD_ID, "random"), RANDOM);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
package fzzyhmstrs.emi_loot.client;

import fzzyhmstrs.emi_loot.util.SimpleCustomPayload;
import fzzyhmstrs.emi_loot.util.SimpleFzzyPayload;
import me.fzzyhmstrs.fzzy_config.networking.api.ClientPlayNetworkContext;

public class ClientLootTablesReceiver {

public static void receiveChestSender(SimpleCustomPayload payload, ClientPlayNetworkContext ctx) {
public static void receiveChestSender(SimpleFzzyPayload payload, ClientPlayNetworkContext ctx) {
ClientLootTables.INSTANCE.receiveChestSender(payload.buf());
}

public static void receiveBlockSender(SimpleCustomPayload payload, ClientPlayNetworkContext ctx) {
public static void receiveBlockSender(SimpleFzzyPayload payload, ClientPlayNetworkContext ctx) {
ClientLootTables.INSTANCE.receiveBlockSender(payload.buf());
}

public static void receiveMobSender(SimpleCustomPayload payload, ClientPlayNetworkContext ctx) {
public static void receiveMobSender(SimpleFzzyPayload payload, ClientPlayNetworkContext ctx) {
ClientLootTables.INSTANCE.receiveMobSender(payload.buf());
}

public static void receiveGameplaySender(SimpleCustomPayload payload, ClientPlayNetworkContext ctx) {
public static void receiveGameplaySender(SimpleFzzyPayload payload, ClientPlayNetworkContext ctx) {
ClientLootTables.INSTANCE.receiveGameplaySender(payload.buf());
}

public static void receiveArchaeologySender(SimpleCustomPayload payload, ClientPlayNetworkContext ctx) {
public static void receiveArchaeologySender(SimpleFzzyPayload payload, ClientPlayNetworkContext ctx) {
ClientLootTables.INSTANCE.receiveArchaeologySender(payload.buf());
}

Expand Down

0 comments on commit e667390

Please sign in to comment.