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.

evilsteve777

Members
  • Joined

  • Last visited

  1. I'm working on a mod that adds fruit trees and am having an issue with the leaf blocks. Here's what I'm trying to do: I want to create a leaf block that has fruit visible on it, when it has fruit, and when right-clicked with the shears drops the fruit as an item and changes texture so no fruit is visible So, I created a leaf block with two textures- one with fruit and without, and that implemented IShearable. Here's the problem(s): 1. The leaf block is using metadata outside of what I need for the fruit part. As a result, the blocks sort of randomly have fruit sometimes, and sometimes not. Does anyone know how leafblocks use metadata? I've been trying to trace the code but have been having some difficulty as the variable names are less than informative. If not, does anyone know if there's any bit in the metadata field that isn't used by leaf blocks? I'm using bit 0 atm and it's not working. 2. Right clicking with the shears doesn't seem to trigger the IShearable event. To do that, you have to left click with them, which destroys the block. Does anyone know how to make a block respond to a right-click with the shears? Thanks in advance. I've included the class code for reference:

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.