Jump to content

EntityPlayer's playerMoveEvent?


snocavotia

Recommended Posts

What exactly causes the EntityPlayer to move? I can get the EntityPlayer object without modifying base code, but i absolutely cannot figure out how to move the EntityPlayer in the same way that he would move if i were to press "w,a,s,d". Does anyone know of a method? I know bukkit has a PlayerMoveEvent, but i cannot find anything like this in forge.

Link to comment
Share on other sites

greyminecraftcoder.blogspot.no/p/list-of-topics.html

 

This page contains a lot of information about how minecraft works internally.

Theres a section on how input works, this could help you dig deeper into it by seeing what invokes the relevant methods and trace it to player movement.

 

 

But uhm couldn't you just modify his velocity?

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

He talks about input, how it handles the overall inputs and from that you could probably find the classes involved and use your IDE to find which stuff calls upon the relevant methods for key input etc.

 

I'm pretty sure the players position is moved related to his current velocity and movement speed, that's at least a common way to do it :P

If you guys dont get it.. then well ya.. try harder...

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



×
×
  • Create New...

Important Information

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