[TUTORIAL] How to fix Harvest Level for Blocks on 2021.1 Snapshot

Started by SparkleArts on

Topic category: Advanced modding

Last seen on 17:39, 23. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to fix Harvest Level for Blocks on 2021.1 Snapshot
Tue, 02/23/2021 - 09:34 (edited)

Hello Guys,

today I want to show you how you can solve the harvest level problem in MCreator 2021.1(03117).

But what exactly is this harvest level problem?

For example, if you set the harvest level of your block to 4, so that the block can only be mined for Netherite tools (so that the block drops) you can use all other tools to mine and you also get the drop that you should only get from Netherite.

Why is this problem?

Quite simply, the code of your block (.java file) is missing a certain code that leads to this problem.

How do you fix the problem?

Go to the mod element of your block and select 'Edit Code' and then click on the only .java file.

Then you look for this line:

Harvest Level Line

Then add this code:

.setRequiresTool()

 exactly after:

(ToolType.PICKAXE)

Then press CTRL+S to save the code.

To save Mod Element Codes you need to lock the Code.

I hope this Tutorial helped you out!

Edited by SparkleArts on Tue, 02/23/2021 - 09:34
Last seen on 19:33, 16. Apr 2023
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
could you help me with 2021…
Sun, 05/01/2022 - 18:35

could you help me with 2021.3? its the same issue in a way, i want to mine a tree with an axe and my hand but it wont let me have both, and the names are a bit different, like instead of .setRequiresTool() , its requiresCorrectToolForDrops())

Last seen on 17:39, 23. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
crowinsanity13, you should…
Wed, 05/25/2022 - 04:21

crowinsanity13,

you should know that in the future MC Versions some Codes like the ".setRequiresTool()" can change. And this Tutorial is only for 2021.1.