Jump to content

Nicnl

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Nicnl

  1. Thank you for your help, the MouseEvent is a brilliant replacement for the PlayerInteractEvent. Unfortunately, this one don't have the X, Y and Z coordinates of the block I'm aiming. The X and Y values provided by this event are not corresponding to what I'm looking for. That's why I used a raytrace with the player's position and camera angles to find the right values. Thread solved.
  2. Thank you for your response. You're right, i'm totally unclear. Sorry for the inconvenience. I'm working on a simple inventory manager plugin that select automatically the best tool when you start digging a block. To do so, I need to know which block I dig, that's why I use the PlayerInteractEvent. That means that i'm working exclusively on the client, and that multiplayer means when i'm connected to a regular Vanilla 1.7.10 server with the client. I hope these informations will be useful.
  3. Hello, I found that the PlayerInteractEvent had a pretty strange behaviour. Let me be a bit more precise. Here's the minimalistic piece of code I used : @SubscribeEvent public void onPlayerBreakBlock(PlayerInteractEvent event) { System.out.println("PlayerInteractEvent => " + event); } Here's the behaviour of this event : - In singleplayer, left clicking a block triggers this event with event.action = LEFT_CLICK_BLOCK - In singleplayer, right clicking (or placing) a block triggers this event with event.action = RIGHT_CLICK_BLOCK - In multiplayer, left clicking a block DOES NOT triggers this event at all. - In multiplayer, right clicking (or placing) a block triggers this event with event.action = RIGHT_CLICK_BLOCK Why does this event isn't triggered in multiplayer when left-clicking a block ? This disfunctionment is happening with the two 1.7.10 Forge builds available at this day : The recommended one (10.13.0.1180) and the latest one (10.13.0.1205). PS : I'm sorry for my English, I'm French.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.