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.

Keter

Members
  • Joined

  • Last visited

  1. So, I'm using the Event PlayerEvent.HarvestCheck and I'm trying to make the harvested block explode in the player's face. Don't ask why. However, I've run into a bit of a problem. There doesn't seem to be any way whatsoever to actually get the location of a block (to make an explosion) with nothing but the block object itself. Entities have static variables that are very easy to use to get an explosion, but I want the explosion to actually originate from the block itself. @ForgeSubscribe public void blockHarvested(PlayerEvent.HarvestCheck event) { event.entityPlayer.worldObj.createExplosion((Entity)null, event.block.posX., event.block.posY, event.block.posZ, 4.0F, true); } Yep, that's all I have. Obviously it doesnt work - the Block class doesn't have posX, or posY, or posZ. Anyone have any clue how this could be accomplished?

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.