TheRPGAdventurer Posted October 30, 2017 Posted October 30, 2017 (edited) I need to make changes to a block and want to do something when right click, but How? Edited October 31, 2017 by TheRPGAdventurer Quote
TheRPGAdventurer Posted October 30, 2017 Author Posted October 30, 2017 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 Quote
TheRPGAdventurer Posted October 30, 2017 Author Posted October 30, 2017 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 Quote
TheRPGAdventurer Posted October 30, 2017 Author Posted October 30, 2017 1 hour ago, diesieben07 said: So this is not your own block? Yup! it's not mine. Quote
TheRPGAdventurer Posted October 31, 2017 Author Posted October 31, 2017 (edited) 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, 2017 by TheRPGAdventurer Quote
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.