How would I stop a vanilla log from dropping when mined with a special tool?

Started by redski on

Topic category: Help with modding (Java Edition)

Last seen on 05:53, 24. Jun 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I stop a vanilla log from dropping when mined with a special tool?

I have a system that drops different materials when a log is mined with a special tool, but the log itself also drops. I want to prevent the log from dropping though so you can't just keep placing the log back down and generate infinite materials. How do I stop the log from dropping?

Last seen on 15:20, 31. Mar 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://imgur.com/a/bNjxGZR …
Sat, 06/17/2023 - 05:15

https://imgur.com/a/bNjxGZR

 

As shown in the image,
Set the world trigger of the procedure to "when a block is destroyed in the world".
If the block at x,y,z is a log and the player has a special tool

Add a random item to the inventory,
You might succeed by canceling the event that caused the global trigger.

However, since the event of block destruction is canceled, the root table cannot be used
Also, the endurance is not consumed, so additional endurance reduction is required.

Last seen on 05:53, 24. Jun 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This method seems to just…
Sat, 06/17/2023 - 19:33

This method seems to just disallow the log to be broken entirely. 

Last seen on 17:59, 7. Jan 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well there are 2 ways:A…
Sat, 06/17/2023 - 20:49

well there are 2 ways:

A. Create a loot table for the logs, using an external site, then make the log loot table in mcreator (with whatever) and override it with your loot table made externally
B. Take the procedure above, but add a "set block at x y z to air" at the very end