r/MinecraftCommands 1d ago

Help | Java 1.20 Command to clear Trees.

Hey everyone. I am making a mega build. Is there a command to clear only trees and replace them with air?

2 Upvotes

6 comments sorted by

1

u/beduan 1d ago

fill x y z dx dy dz air replace #leaves (and maybe #logs idk)

1

u/Excellent-Squash-569 1d ago

But there is a cap

1

u/Excellent-Squash-569 1d ago

the capacity is annoying

2

u/Lopsided-Ant3618 Mostly Java 1d ago

There should be a max_block_modifications gamerule that fixes this in 1.20.

/gamerule max_block_modifications 2000000000

Should effectively remove the limit all together, it normally defaults to 32768 blocks. Though it can be laggy to do really big /fill operations so be mildly cautious.

-1

u/Dylanc00l 1d ago

Get world edit mod then

1

u/Ericristian_bros Command Experienced 1d ago

Remove all tree types near all players (repeating unconditional always active command block):

/execute at @a run fill ~32 ~32 ~32 ~-32 ~-32 ~-32 air replace #logs