Minecraft trees (programming)?

Il
- in Plugins
10

I have written a plugin to get rid of tree trunks at once… Only now I do not know what to do next. I want the leaves on the tree immediately go away and the whole tree goes away when I break down a log. (I'm currently programming on a SpeedUHC).

It would be nice if you could help me there.

vo

Where is the problem?

Il

I also want to get rid of the foliage in one fell swoop but I do not know exactly how to do it.

Ta

How do you get the wood away?
If you get rid of the wood, the leaves should not be a problem anymore…

Otherwise, just make sure that with every item that is a block of wood, it is checked whether the blocks are foliage blocks outside and then distanced. I did something like that… But that was a while ago

Il

But how do I do that leaves go away with what code?

Wa

There's something called YouTube tutorial

Il

Something you can't find on YT.

vo

Why do you get wood but no leaves?

Ta

Just as I described above.

/ fill ~ 3 ~ 3 ~ 3 ~ -3 ~ -3 ~ -3 air replace #leaves

Just do it on every block of wood:

/ execute at @e [type = item, nbt = {Item: {id: "minecraft: spruce_log"}} run fill ~ 3 ~ 3 ~ 3 ~ -3 ~ -3 ~ -3 air replace #leaves

You have to do that for every kind of wood

But how do you do that, you have not said that yet, then I can help you better

Ta

I think I have actually seen something like that in the Richtunng, you just have to know what to look for.
But the answer is actually not very helpful…

Ta

I ask myself too.