Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Modifying block behavior [1.12.2]


Recommended Posts

So I have an idea for a mod, but I'm unsure of the best approach for it, and I would like some guidance. 

I want to make a mod that allows you to collect netherrack with your fist, like punching trees to get wood.The way I would do it is make an event handler that checks for blocks being beroken, and if the block is netherrack, add drops. however, it seems wasteful to create a whole event handler for this one thing. Is there an easier way to do this? 

 

EDIT: Block.setHarvestLevel is unfortunately no longer an option in modern forge

Edited by theishiopian
Update status
Link to post
Share on other sites
1 hour ago, Meldexun said:

Since my first attempt isn't working  i would use the HarvestCheck event. You only need to check if the block is netherrack and set the success to true.

Given the lack of an alternative, I think that's what I'll go with. Thanks anyways for your help. If anyone chances upon this thread with a better solution, I'm all ears.

Edited by DaemonUmbra
Cleaned up reference to thread hijack that was hidden
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.