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.

Featured Replies

Posted

I need a function (to put in my item's class) that gets called when the player uses the item to break a block right when he starts breaking it. I know about onBlockDestroyed() but I can't find anything for this. onStartBlockBreak() doesn't get called until right before the block is broken.

Lead DivineRPG Developer

I need a function that checks when the player uses the item to break the block right when he starts breaking it. I know about onBlockDestroyed() but I can't find anything for this. onStartBlockBreak() doesn't get called until right before the block is broken.

 

You said "the item". Does this mean that you want check if the player is holding a special item? In this case i would place the code in the item class.

Here could be your advertisement!

  • Author

You said "the item". Does this mean that you want check if the player is holding a special item? In this case i would place the code in the item class.

Sorry I should have been more specific. I'm putting this function that I want in the Item's class.

Lead DivineRPG Developer

whats the function of the item?

 

whats the outcome of using the item on the block and the relevance of the item to the block cause ive just recently been doing stuff with forge events around specific items breaking specific blocks

Yeah, If you want to go through the trouble of using forge events, then you would be able to do basically any you want.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Go through the trouble of?  I didn't notice it requiring much effort.

Long time Bukkit & Forge Programmer

Happy to try and help

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.