[Solved] how to make players unable to mine wood unless they are using a tool?

Started by McModded1.14 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved] how to make players unable to mine wood unless they are using a tool?
Wed, 08/30/2023 - 00:55 (edited)

I am starting on a mod that's not ready for download yet. The mod is meant to make players need to use tools to mine wood. Also there will be a way to make tools before wood.

Solved months ago

Edited by McModded1.14 on Wed, 08/30/2023 - 00:55
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know it is probably too…
Fri, 02/18/2022 - 01:15

I know it is probably too late. but...

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
its a couple months late,…
Sat, 08/19/2023 - 15:35

its a couple months late, but this is the solution i found. works perfectly:

basically, it checks if the block is wood, then checks if the player is holding an axe of any type. (this works with both modded woods and axes.)

only if both are true, it cancels the event that triggered it, stopping the left click. because the player is holding click, they continue to punch, but it does zero damage to the block itself. this essentially is exactly how the bedrock block works.

you can also do this with stone and pickaxes, dirt and shovels, pretty much anything. all you need is more procedures.