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.

UrsOsprey

Members
  • Joined

  • Last visited

  1. You were very helpful, Jay. Thank you.
  2. How do you suggest I do that?
  3. When I try to find the payer's location via int posX = (int) Math.floor(player.posX); int posY = (int) Math.floor(player.posY); int posZ = (int) Math.floor(player.posZ); the Y position returns 2 numbers, which it outputs one at a time and goes back and forth between them. How would I go about having it return only 1 value? (A Stable value.. if you will)
  4. EntityPlayer player = (EntityPlayer) event.entity; int posX = (int) Math.floor(player.posX); int posY = (int) Math.floor(player.posY); int posZ = (int) Math.floor(player.posZ); if (player.inventory.getCurrentItem() != null) { if (player.inventory.getCurrentItem().getItem() instanceof Item) { player.worldObj.setBlock(posX, posY + 5, posZ, block); } } When I use this code, it places 2 blocks above my head when I'm grounded, but when I fly, it places 2 blocks above my head with a block of air in between. Is there any way I can get the coords of my feet or something to return a more stable Y value? Thank you!

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.