Skip to content

Commit

Permalink
refactor: ♻️ Clean up payload related stuff - registerPackets > regis…
Browse files Browse the repository at this point in the history
…terPayloads rename + register storage payloads to storage instead of core as it was before
  • Loading branch information
P3pp3rF1y committed Dec 18, 2024
1 parent 61a71f5 commit 54bd8bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class CommonEventHandler {
public void registerHandlers(IEventBus modBus) {
ModItems.registerHandlers(modBus);
ModBlocks.registerHandlers(modBus);
modBus.addListener(ModPayloads::registerPackets);
modBus.addListener(ModPayloads::registerPayloads);
IEventBus eventBus = NeoForge.EVENT_BUS;
eventBus.addListener(this::onItemPickup);
eventBus.addListener(this::onLivingSpecialSpawn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ModPayloads {
private ModPayloads() {
}

public static void registerPackets(final RegisterPayloadHandlersEvent event) {
public static void registerPayloads(final RegisterPayloadHandlersEvent event) {
final PayloadRegistrar registrar = event.registrar(SophisticatedBackpacks.MOD_ID).versioned("1.0");
registrar.playToServer(BackpackOpenPayload.TYPE, BackpackOpenPayload.STREAM_CODEC, BackpackOpenPayload::handlePayload);
registrar.playToServer(UpgradeTogglePayload.TYPE, UpgradeTogglePayload.STREAM_CODEC, UpgradeTogglePayload::handlePayload);
Expand Down

0 comments on commit 54bd8bf

Please sign in to comment.