From 6ae1dd2522766b1f740c18375a52e3c71757c694 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 5 Oct 2023 20:38:39 +0100 Subject: [PATCH] Fix entrypoints --- .../src/testmod/resources/fabric.mod.json | 4 ++-- .../test/client/event/interaction/PlayerPickBlockTests.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fabric-events-interaction-v0/src/testmod/resources/fabric.mod.json b/fabric-events-interaction-v0/src/testmod/resources/fabric.mod.json index ae4e2731e1..f3ad498ebe 100644 --- a/fabric-events-interaction-v0/src/testmod/resources/fabric.mod.json +++ b/fabric-events-interaction-v0/src/testmod/resources/fabric.mod.json @@ -12,14 +12,14 @@ "main": [ "net.fabricmc.fabric.test.event.interaction.AttackBlockTests", "net.fabricmc.fabric.test.event.interaction.PlayerBreakBlockTests", - "net.fabricmc.fabric.test.client.event.interaction.PlayerPickBlockTests", "net.fabricmc.fabric.test.event.interaction.UseEntityTests" ], "fabric-gametest": [ "net.fabricmc.fabric.test.event.interaction.FakePlayerTests" ], "client": [ - "net.fabricmc.fabric.test.client.event.interaction.ClientPreAttackTests" + "net.fabricmc.fabric.test.client.event.interaction.ClientPreAttackTests", + "net.fabricmc.fabric.test.client.event.interaction.PlayerPickBlockTests" ] } } diff --git a/fabric-events-interaction-v0/src/testmodClient/java/net/fabricmc/fabric/test/client/event/interaction/PlayerPickBlockTests.java b/fabric-events-interaction-v0/src/testmodClient/java/net/fabricmc/fabric/test/client/event/interaction/PlayerPickBlockTests.java index 3ec310119d..18235ef822 100644 --- a/fabric-events-interaction-v0/src/testmodClient/java/net/fabricmc/fabric/test/client/event/interaction/PlayerPickBlockTests.java +++ b/fabric-events-interaction-v0/src/testmodClient/java/net/fabricmc/fabric/test/client/event/interaction/PlayerPickBlockTests.java @@ -20,12 +20,12 @@ import net.minecraft.item.Items; import net.minecraft.util.Hand; -import net.fabricmc.api.ModInitializer; +import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.event.client.player.ClientPickBlockApplyCallback; -public class PlayerPickBlockTests implements ModInitializer { +public class PlayerPickBlockTests implements ClientModInitializer { @Override - public void onInitialize() { + public void onInitializeClient() { ClientPickBlockApplyCallback.EVENT.register((player, result, stack) -> { if (player.getStackInHand(Hand.MAIN_HAND).getItem() == Items.DIAMOND) { return new ItemStack(Items.OBSIDIAN);