promotional bannermobile promotional banner
premium banner
Timber Chop Mod, tree, cutting

Description

TimberChopMod
TimberChopMod is a simple yet powerful mod that, with a single swing of your axe, fells an entire “tree-like” cluster of log blocks and then removes the leaves around each of them.


🔨 How it works?

Trigger
When a player on the server (server-side only) breaks any block tagged LOGS while holding an AxeItem, the chop effect is activated. Instead of allowing the normal single-block break, the mod intercepts the event, cancels it, and performs its own “timber” logic.


Flood-fill in 3×3×3
The mod uses a breadth-first search through all adjacent log blocks in a 3×3×3 cube (including diagonal neighbors) from the original block, gathering every connected block with the LOGS tag into a set.


Breaking the logs
Once all connected log blocks are collected, the mod loops through that set and breaks each one server-side, causing them to drop their items. Because the original single-block break was canceled, none of the logs break normally; everything is removed in one instant sweep. The break reason code used is 512, so it behaves like a player-initiated break for drops and statistics.


Leaf cleanup
After identifying all log positions, the mod then searches outward from each log block to a radius of 2 blocks in every direction to find any blocks tagged LEAVES. All found leaf blocks are broken immediately (also using reason code 512), simulating natural leaf decay in a single pass.

 

 

 


 

⚙️ Installation

Fabric

  • 1.0.1-fabric.jar

    1. Install Fabric Loader (0.16.14) & Fabric API (0.123.0+1.21.5) for Minecraft 1.21.5.

    2. Drop timberchop-1.0.1-fabric.jar into your mods/ folder.

  • 1.0.2-fabric.jar

    1. Install Fabric Loader (0.16.14) & Fabric API (0.126.0+1.21.6) for Minecraft 1.21.6-pre3.

    2. Drop timberchop-1.0.2-fabric.jar into your mods/ folder.

Forge (1.0.1-forge.jar)

  1. Install Forge Loader 55.0.21+ for Minecraft 1.21.5.

  2. Drop timberchop-1.0.1-forge.jar into your mods/ folder.