Posted October 30, 20178 yr I need to make changes to a block and want to do something when right click, but How? Edited October 31, 20178 yr by TheRPGAdventurer
October 30, 20178 yr Author 25 minutes ago, diesieben07 said: onBlockActivated will be called when the block is right clicked. How about the player interaction one, since they added offset ands i kinda lost where they are right now
October 30, 20178 yr Author 1 hour ago, diesieben07 said: What? SubscribeEvent public void onPlayerInteract(PlayerInteractEvent evt) { // only handle right clicks on blocks // TODO: port for 1.9 if (evt.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { return; } It's from an older version, I'm trying to update it
October 30, 20178 yr Author 1 hour ago, diesieben07 said: So this is not your own block? Yup! it's not mine.
October 31, 20178 yr Author On 10/31/2017 at 0:21 AM, diesieben07 said: PlayerInteractEvent still exists, it has several sub-events now. Figured it out now. SubscribeEvent public void onPlayerInteract(PlayerInteractEvent.RightClickBlock evt) { } Edited October 31, 20178 yr by TheRPGAdventurer
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.