Minecraft Tree Tipper Command Block Error

I am trying to create a system that when you break any block on a tree, the whole thing will break. I successfully made that part, but ran into an error. I have it so the tree is relative to a bat named Tree1, so anywhere there's a bat named Tree1, there will be a tree. What I am having a problem with is that when ever I break a block on one tree, it affects all of the other trees. I need to know how to have the same bat under each tree(no differences what so ever), then somehow change the bat once it's tree gets chopped down. I could set it so that the player receives a scoreboard point when their holding an axe, and the tree would only fall when that player is in a certain range, but that might get messy around tress that are clumped together, and I also want to keep it as compact as possible. Here is the code:
Spawning the bat:
/summon Bat X Y Z {NoAI:1,Silent:1,CustomName:"Tree1"}
Setting the scoreboard:
/scoreboard objectives add Tree1 dummy Tree1
/scoreboard players set @e[type=Bat] Tree1 1 {CustomName:"Tree1"}
(on a setblock clock)
Spawning the tree:
/execute @e[type=Bat,score_Tree1_min=1] ~ ~ ~ /fill ~ ~2 ~ ~ ~7 ~ log
/execute @e[type=Bat,score_Tree1_min=1] ~ ~ ~ /fill ~-1 ~4 ~-1 ~1 ~8 ~1 leaves 1 replace air
Testing to see if a block is broken:
/execute @e[type=Bat,score_Tree1_min=1] ~ ~ ~ /testforblock ~ ~3 ~ air
(on a setblock clock)
Using a comparator to remove the tree:
/execute @e[type=Bat,score_Tree1_min=1] ~ ~ ~ /fill ~-1 ~2 ~-1 ~1 ~8 ~1 air
Spawning the dropped items:
/execute @e[type=Bat,score_Tree1_min=1] ~ ~ ~ /summon Item ~ ~2 ~ {Item:{Count:4,id:log,tag:{display:{Name:Wooden Log}}}}
Any help would be useful. Thanks.
Pictures about "Minecraft Tree Tipper Command Block Error"



Why do my command blocks not work?
Due to the power of the command blocks, there are a few conditions that need to be met in order to use them in your server. First, you will need to enable command blocks directly in the server settings. Secondly, you will need to be OP on the server and in creative mode to be able to place the block.What is the command to remove trees in Minecraft?
Type /gamerule randomTickSpeed 1000 in the chat and press ENTER. Break the wood blocks of the trees. The leaves will automatically disappear. There is no faster solution without using mods, add-ons, or plug-ins. /replaceitem is used for different purposes other than manipulating blocks in your world.What is a syntax error in Minecraft?
You forgot to give the player argument leading to a syntax error. This is the programming term for a grammar error. The unexpected " is related to the internal representation of the item name you supplied.What is the command for clearing blocks?
Minecraft: Using the fill command to clear chunks To do this, players can either use the F3 key on Minecraft: Java Edition or the "show coordinates" option in Bedrock Edition to note the start and end points of where they want the fill command to clear.Minecraft Redstone Tutorial | How to use testfor commands in MCPE!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Marta Dzedyshko, Maria Orlova, Julia Volk, Maria Orlova