[1.9] How to create & register a sound using the new registry system? [Solved]
-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
Try if(player.getItemInHand(InteractionHand.MAIN_HAND).getItem() == ItemInit.SOUL_POUCH_ARTIFACT.get()) { player.sendSystemMessage(Component.literal("Test")); }
-
By MainBreezy · Posted
Im new to Forge modding and wanted to make a mod as a self project. Im trying to test if the player is holding a specific item when an event happens but it seems to not be doing anything. if(player.getItemInHand(InteractionHand.MAIN_HAND).equals(new ItemStack(ItemInit.SOUL_POUCH_ARTIFACT.get()))){ player.sendSystemMessage(Component.literal("Test")); } I know the event works because it runs fine without the if statement. Thanks. -
Works for me, mc 1.20.1 forge 47.2.0 Post your code
-
This event is not called when I press the pressure plate.
-
Topics
-
Who's Online (See full list)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.