-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
check if the player of the Event is an instance of ServerPlayer
-
By Youssef Amr Sayed Amir Misbah · Posted
This is happening inside the customitem class -
By Youssef Amr Sayed Amir Misbah · Posted
but i can show you the bear outline @Override public InteractionResult useOn(UseOnContext pContext) { if(pContext.getLevel().isClientSide()) { BlockPos positionClicked = pContext.getClickedPos(); Player player = pContext.getPlayer(); here is supposed to be where i put the placement code after i grab all needed coords but i cant find the right command pContext.getItemInHand().hurtAndBreak(1, pContext.getPlayer(), (Player) -> player.broadcastBreakEvent(player.getUsedItemHand())); return super.useOn(pContext); } Player needed a capital P -
By Youssef Amr Sayed Amir Misbah · Posted
but i can show you the bear outline @Override public InteractionResult useOn(UseOnContext pContext) { if(pContext.getLevel().isClientSide()) { BlockPos positionClicked = pContext.getClickedPos(); Player player = pContext.getPlayer(); here is supposed to be where i put the placement code after i grab all needed coords but i cant find the right command pContext.getItemInHand().hurtAndBreak(1, pContext.getPlayer(), (player) -> player.broadcastBreakEvent(player.getUsedItemHand())); return super.useOn(pContext); }
-
Topics
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.