Posted February 9, 20223 yr So this is a code for a "burst-type" gun, what it does is that it stops the onKeyPressed (holding) after a couple of ticks, effectively making a burst-like click. https://paste.gg/p/anonymous/e2996b28a8dd4c4287393e86bf48572a I was told that the error is that the server does not what player to reference so it just dies and crashes the server
February 9, 20223 yr what kind of Event are the preShoot and the postShoot? you need to add the Dist to the EventBusSubscriber via the 'value' and set it to Dist.CLIENT
February 9, 20223 yr Author 2 hours ago, Luis_ST said: you need to add the Dist to the EventBusSubscriber via the 'value' and set it to Dist.CLIENT Ayye! Works almost like a charm! It does not crash, however, none of the postShoot/preShoot events trigger, these are in charge of making the shooting sound and spending ammo upon shooting. Log be here: https://paste.gg/p/anonymous/e8f630c32007453cbd86b0cf65a22a7c Back to the drawing board it goes!
February 9, 20223 yr Author Sorry for the late response! Pre and Post events are from here: https://paste.gg/p/anonymous/83ac3cee914c44d5804261f1a56e7c69 And BURST is never used before
February 9, 20223 yr 40 minutes ago, Alanor Miga said: https://paste.gg/p/anonymous/83ac3cee914c44d5804261f1a56e7c69 do not post code for other here, you can permalink them on github, for example: this these Events are server and client side or server side only (im not 100% sure), but this means you can't put them into a Client side EventHandler class, move them to a new/other EventHandler
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.