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.

SecondAmendment

Members
  • Joined

  • Last visited

Everything posted by SecondAmendment

  1. Ah ok, So it will never be precise, but if I was to change the previous position to a float, would it be more accurate?
  2. Ignore the Print statement, I was just debugging
  3. Im trying to get the Player to move Forward exactly one block from its last position. So lets say his last position was 11.54321 etc... I would like him to stop at 12.54321 if he was moving in the Positive X direction. I know I have to account for the player movement speed, and so I made a conditional, but at no point in time are the players previous X coordinate equal to its new X coordinates. Please Help! Here is the Conditional: new Timer().schedule( new java.util.TimerTask() { @Override public void run() { double x = Minecraft.getMinecraft().thePlayer.posX; System.out.println(x); System.out.println(x+.5); boolean atPosition = true; Minecraft.getMinecraft().thePlayer.rotationYaw = Minecraft.getMinecraft().thePlayer.rotationYaw+rotation; Minecraft.getMinecraft().gameSettings.keyBindForward.setKeyBindState(Keyboard.KEY_W, true); while(atPosition){ System.out.println(Minecraft.getMinecraft().thePlayer.posX); if(Minecraft.getMinecraft().thePlayer.getPosition().getX() == x+1){ Minecraft.getMinecraft().gameSettings.keyBindForward.setKeyBindState(Keyboard.KEY_W, false); Minecraft.getMinecraft().thePlayer.rotationYaw = Minecraft.getMinecraft().thePlayer.rotationYaw+rotation; atPosition = false; } } atPosition = true; } }, 0 );

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.