Jump to content

[1.9] this.setHarvestLevel() but you can break the block whitout the tool


Recommended Posts


good days

im porting mi blocks and doors to 1.9 and realize something


well if i set in the constructor fro the block whith

this.setHarvestLevel("pickaxe", 3);


this means than the block can only be harvested whith peckaxes of at least level 3

but you still can break the block whith a wodden pickaxe



if i wanna make this block only breakeable if is done whith the right tool and level

is there sme where something like an

this.setBreakLevel("pickaxe", 3);  or something that makes the block unbreakeable unless the right tool is used ???


Link to comment
Share on other sites

You can't, that's not how vanilla works.  Vanilla assumes that any, and every block that can be broken can be broken by hand (given enough time).  You would know this if you'd ever actually played the game.


If you actually want to prevent the player from ever breaking a block that their tool can't harvest then you need to interrupt the action via the event system.


Also, spelling.  All of these are wrong:







Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.


Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.


DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

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 Terms of Use.