Started by
toaster_dragon1
on
Topic category: Help with Minecraft modding (Java Edition)
I am making a mod that makes the survival early game of Minecraft much harder, more realistic and technical.
I want to make it so that a log can only drop a log if mined with an axe. How do i delete the drop when mined by hand?
https://imgur.com/a/O8XfXoo
This is a bare bones implementation, you'll have to figure out what you want to do to allow the player to eventually break the blocks.
I didn't know that there was a block that could cancel global triggers. I copied the code you showed and added a second condition checking if the item in the main or off hand was an axe and it worked. thanks for the help.
i have tried to show what the code blocks look like with punctuation. each type of bracket is a type of block the things i have written just below this say what each type of bracket is.
{action block} [data block] (multiple selection box) /top part of if or repeat block [data] \
\bottom part/ {action}
the code is:
{when event triggered by external call or when global trigger (block is broken)}
/if [is [item in main hand of [ event target entity] ] of item type (axe) ] \
\do/ {cancel event that triggered global trigger}