Skip to content

Commit

Permalink
Fix entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Oct 5, 2023
1 parent 2fe607a commit 6ae1dd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6ae1dd2

Please sign in to comment.