Jump to content

3x3 Pickaxe?


ProUnpro

Recommended Posts

Noob here but from what I could find you'd create an event handler that listens for destroyed blocks using a handleBlockDestruction method.

You'd then check if the event.entity has the correct pickaxe equipped. If so, you can iterate through the affected blocks. Should be all blocks with either x, y or z coordinate one greater or smaller than the destoryed one.

Not sure about how to add the actual item to the game. For wireframing you can try to have all pickaxes affected at first. But you'll probably find some tutorials on how to create new items.

Edited by Villager_31441
Link to comment
Share on other sites

Do you mean you're creating a new pickaxe that can do this, or do you want the regular pickaxe to do it (maybe when using a potion or something)?

 

I'm assuming you want to make a new pickaxe. In that case, just like said above you'd keep the rest of the vanilla pickaxe code but you'd change the code where it breaks the block, and simply add lines to break all the neighboring blocks. Simply add to the block position and break the block there. Of course depending on how you want it to work you'd probably need to check what type of blocks are there and make sure they are breakable or should break -- like just because you break an easy-to-break block you don't want the neighboring hard-to-break blocks to also break. So I assume you'd also check that they are the same type as the original broken block.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
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.
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.