Posted May 26, 201510 yr The title pretty much says it. Is there some sort of event for this? I've seen it done by other mods before, so I know it's possible.
May 26, 201510 yr I am on 1.8 so no help here, BUT - notice that blocks like Workbench only 'work' when you are not sneaking. (sneaking makes you place blocks). Use reverse-tactic (look vanilla). Also - if you don't want to use player.isSneaking (or whatever the field's name is)and need that value on server, you will need to make IExtendedEntityProperties and store when the button is pressed and when not (send packet from client to server - on click "true" on unclick "false"). 1.7.10 is no longer supported by forge, you are on your own.
May 27, 201510 yr public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g, float t){ if (!world.isRemote && player.isSneaking()){ //Player is Sneak + Right Clicking } else { //Player is just clicking } return true; }
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.