Jump to content

Recommended Posts

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

Posted

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!

Posted

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

Posted

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

Posted

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!

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.