Posted July 10, 20178 yr Hello, I believe i know how to change the harvest level of a vanilla block but what i was wondering was how to prevent it from being broken with your fist. Thanks for any help.
July 11, 20178 yr Author I have tried using Blocks.LOG.setHarvestLevel("axe", 0); But i can still harvest it with my fist. I can even harvest it with wood axe when i change the level to 2. Am i doing something wrong or is it not possible to change vanilla block properties.
July 11, 20178 yr 1 hour ago, drok0920 said: I have tried using Blocks.LOG.setHarvestLevel("axe", 0); But i can still harvest it with my fist. I can even harvest it with wood axe when i change the level to 2. Am i doing something wrong or is it not possible to change vanilla block properties. It actually only seems to be certain Blocks. For example I can do Blocks.DIAMOND_ORE, but not to either of the Logs. If you really want to override the logs like that use events. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 11, 20178 yr Yes, the HarvestDropsEvent might come in handy here. Whatever Minecraft needs, it is most likely not yet another tool tier.
July 11, 20178 yr As well as the BreakSpeed event. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 11, 20178 yr 2 hours ago, drok0920 said: I have tried using Blocks.LOG.setHarvestLevel("axe", 0); But i can still harvest it with my fist. I can even harvest it with wood axe when i change the level to 2. Am i doing something wrong or is it not possible to change vanilla block properties. You forgot about the can_harvest_with_fist_if_Material_allows_it property public static final Material WOOD = (new Material(MapColor.WOOD)).setBurning(); //does not need tool public static final Material ROCK = (new Material(MapColor.STONE)).setRequiresTool(); //requires tool Edited July 11, 20178 yr by Draco18s 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.
July 11, 20178 yr Author Well i'd like to avoid using events because i personally dislike them but i will use them if it's the only way to achieve this. @Draco18sThe methods used to set whether or not ir requires a tool are protected so i cannot change them. Are events the only way to do what i'd like to do?
July 11, 20178 yr Author I find them to generally be messy in my experiences with them but i did say that i use them when i must.
July 11, 20178 yr Author I find that for things like what im trying to achieve here i'd rather be able to change a value in the block class than check multiple values in an event and respond accordingly.
July 11, 20178 yr Author Fair enough i didnt really think about that. So can you explain to me where to put the events i need to use?
July 11, 20178 yr Author One last thing, how can i remove all drops from the block during the harvest event.
July 11, 20178 yr Author 11 minutes ago, Franckyi said: HarvestDropsEvent::getDrops().clear() ? Yes thank you that works perfectly
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.