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.

Hawpe

Members
  • Joined

  • Last visited

  1. I'm using the ClientDisconnectionFromServerEvent event to listen for any disconnection. I am only interested in getting disconnections that happened due to errors (time out, etc.). This listens for every disconnection including the ones triggered by the player. How can I either only catch the errors that are thrown, or check for the reason? Thank you.
  2. I'm not asking for you to maintain old versions though, just asking if you are aware of a way to do what I'm trying to achieve with what's currently available in 1.8.9. I don't want you to add anything new.
  3. I can't, this is a mod for a 1.8.9 server. Furthermore, it's not my mod, I'm adding functionality to someone's mod.
  4. I'm trying to check if an item can be placed. I started out by checking if the ItemStack is a block but it misses some items such as sugar cane, nether wart, etc. I haven't been able to find a function isPlaceable or any Interface that could be used with instanceof. My code right now: BlockPos blockPos = mc.objectMouseOver.getBlockPos(); ItemStack itemInUse = mc.thePlayer.getHeldItem(); if (itemInUse != null) { Block resultBlock = Block.getBlockFromItem(itemInUse.getItem()); if (mc.theWorld.getBlockState(blockPos).getBlock().getMaterial() == Material.air || resultBlock == null) { return; } } Is there any function that can do what I'm trying to achieve?

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.