Jump to content
  • Home
  • Files
  • Docs
  • Merch
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • hydroflame

hydroflame

Members
 View Profile  See their activity
  • Content Count

    1511
  • Joined

    November 1, 2012
  • Last visited

    June 24, 2014

 Content Type 

  • All Activity

Profiles

  • Status Updates
  • Status Replies

Forums

  • Topics
  • Posts

Calendar

  • Events
  • Event Comments

Everything posted by hydroflame

  • Prev
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • Next
  • Page 59 of 59  
  1. hydroflame

    bug with PlayerInteractEvent cancellation

    hydroflame posted a topic in Support & Bug Reports

    hi, i came accross this weird bug where cancelled event wouldn't be processed before the next event and the 2nd event wouldn't be properly processed. the code is really simple (the one needed to reproduce the bug anyway): @ForgeSubscribe public void cancelAllBlockPlaced(PlayerInteractEvent event){ if(event.action == event.Action.RIGHT_CLICK_BLOCK){ event.setCanceled(true); } } so basicly this should stop ALL block from behing placed (as well as removing the possibility of using crafting table and other GUI block but that's not the point) but this code appears to be skipped when the players spam right click to place blocks example: p = player [] = empty block p[][][][] p[][][c][] when the player right click once on block 'c', the event is canceled correctly (nice ) when the player spam r click the ground (not too fast), it makes a block appear and dissapear . finally, when the player right click at a fast enough speed, he can place a block on the canceled block (before it dissapear) and permanently place a new block ex: before: p[][][] p[][][] click 1: p[][][][] p[][][c][] click 2 (shortly after click 1): p[][][][] p[][c][c][] after forge cancel event 1: p[][][][] p[][c][][] anybody know why it does this and an easy way to fix this (beside adding the event to a thread and look if all event were canceled succefully/correctly)? thx in advance
    • November 1, 2012
    • 3 replies
  • Prev
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • Next
  • Page 59 of 59  
  • All Activity
  • Home
  • hydroflame
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community