Jump to content

Add canceling of mouse movement to MouseEvent


TrashCaster

Recommended Posts

Like the title says, expand the MouseEvent to allow mod creators to cancel the mouse movement (zeroing the deltas).

The main point to this would be to lock a player's rotation when they try to move their mouse.

 

  • CameraSetupEvent only affects the camera's rotation, as the player can spin freely as they wish. That is a no-go.
  • "Teleporting" the player back to a rotation looks hideous. It's jittery, and awful, and I won't be a part of that crowd.

Alternatives include:

  • Release the final modifiers on the delta x and y variables in the event, so you could just set them to 0 when the event is fired.
  • Create a new PlayerRotateEvent, which fires on both client, and server, allowing flexibility on each end when either the mouse moves, or the server is about to rotate the player via yaw and pitch updates

 

Opening this up would allow mod creators to do more immersive "cut scenes", or animations and renderings that look better when the player is not in turning. For example, when I was working on a hookshot mod, it looked really weird to fire it, and the player could turn around while holding it as the spike was pulling chain away from them. Locking the player rotation would help with effects like that.

 

I would even be alright with a new EntityPlayer#setRotationLocked(Object mod,boolean locked).

The purpose to having the mod instance would be to allow several mods to lock the rotation for their own purpose, but not unlock it later when another mod needs it locked.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It is painful to invest and lose, binary options are more of a gamble if you ask me, especially when your broker decides to invest on your behalf. That's how I lost all my funds thanks to my broker who claimed to have invested on my behalf and lost a sum of 115,000 USD. This made me realize that people should really be careful out there especially when funds are involved, this is not to say recovery is not possible even though there are several frauds out there who claim they can recover your funds. This will only depend if you have done your research on the recovery agent that you would want to use to help you. After what happened to me, I wouldn’t like the same situation to happen to me, losing money. I did a thorough check on CYBERSPACE HACK PRO after coming across numerous testimonies on him helping lots of people to recover their funds/BTC. It took me a whole week to decide if I would be doing the right thing by hiring him. I emailed on Cyberspacehackpro(@)rescueteam.com and he responded. Asked him various questions and he really did impress me; he really knew his way on recovery. After providing all the necessary details, he did his incredible work and in 4 days time, my funds were recovered. Whether someone outside there feels like whatever I did to recover my funds rather than report it to the police was through unethical means, I wouldn’t care because as far as I am concerned, I don’t care because I was able to retrieve my hard-earned funds taken from me and that’s all, a big thank you to CYBERSPACE HACK PRO Recovery. CONTACT: CYBERSPACE HACK PRO Email: Cyberspacehackpro(@)rescueteam.com
    • Im using exaroton hosting with mods. Im play normally with my friends, and in some point the server freezes, and eventually kicks us for ''time out'', and the server never unfreezes again. when i reload the server, the world doesn't suffer any damage, but the players seem to go back in time. Example: I'm in a cave mining diamonds and I collect them. The server freezes and times out. when I restart the server, the cave diamonds are gone, but they are not in my inventory either. as if the player has gone back in time, but the world has not. Its really annoying for me and my friends. If someone can help me ill be so grateful. It doesn't seem to be any error in the console nor log.
    • Logs: https://pastebin.com/LBZs2U25
    • I'm fairly new to modding Minecraft, but I have no clue how to fix this. Help? Failed to parse version spec [1.20.1-18.0.0.598) org. apache .maven .artifact .versioning .InvalidVersionSpecificationException: Single version must be surrounded by []: [1.20.1-18.0.0.598)  
    • Some days past, he can't still join New logs from him https://pastebin.com/PN83ReKT
  • Topics

×
×
  • Create New...

Important Information

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