Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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...

  • Author

Hmmm I hadn't thought about changing velocity. And i cant seem to find where he talks about the methods invoked by pushing the "wasd" keys.

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...

  • Author

Thanks! this very well may work! Also, do you know a way to make a character jump? I'm going to have to detect possible collisions and jump over them.

  • Author

Lol yeah.. i slapped myself in the face after i asked that... haha.

Anyways thanks alot for the help its working now!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.