HT's TreeChop

HT's TreeChop

3M Downloads

Allows trees to be chopped down by repeatedly breaking a single block. The whole tree will only break after a certain number of chops, and bigger trees require more chops. Inspired by mods like Treecapitator.

Fabric: (requires Forge Config API Port)

Forge:

Also check out:

Things to consider when lumberjacking:

  • Chopping trees doesn't require an axe, but will take a while without one
  • Chopping different blocks of the same tree will all contribute to bringing down the tree
  • Players can work together to chop down those big trees
  • Bigger trees require more total chops, but fewer chops per block*
  • Hold "sneak" when breaking a log block to break it normally

*By default, the number of chops required to fell a tree is computed logarithmically. Some example numbers are below. The number of chops can also be configured to scale linearly with the number of blocks to, for example, require one chop per block, or one chop per tree. More information can be found here.

Tree blocks 

  Chops required

1 1
3 3
5 4
10 7
20 12
50 19
100 25

Cool features:

  • Doesn't get too loud when breaking big trees
  • Works on mushrooms and fungi
  • Intelligently breaks leaves
  • Compatible with most modded trees

Let's chop down a redwood from Biomes O' Plenty:

And be sure to watch Boodlyneck show us how it's done (and check out the other cool mods in the video!):

FAQ:

1. How do I turn off chopping?
Press n to open TreeChop's in-game settings, then toggle off the "chopping" setting. A key can also be bound to toggle chopping without opening the settings screen; go to Options > Controls and find the section labeled "HT's TreeChop".

2. How do I keep chopping off and only turn it on while sneaking?
By default, sneaking inverts your current chop setting, so just toggle chopping off (press n to access the settings screen) so that chopping will be enabled by sneaking.

3. How do I keep chopping even when sneaking?
Press n to open TreeChop's in-game settings, then toggle off the "Sneaking inverts chopping" setting.

4. How do I keep from chopping my house down?
There's a setting to disable chopping if the "tree" is not connected to leaves. Press n to open TreeChop's in-game settings, then toggle "trees must have leaves".

5. I started chopping my house down. How do I stop?
If you find yourself chopping a block when you just wanted to break it normally, try breaking the block while sneaking, or toggle off chopping (press n to access the settings screen).

6. I was chopping something and the game crashed! What's up with that?
Probably the item you used to chop the tree doesn't play nice with TreeChop. Go to [your minecraft folder]/config/treechop-common.toml and add the item's registry name to choppingToolsBlacklist, or ask the server owner to, and then maybe let me know about the conflict and I'll try to fix it.

7. Why can't I chop anymore?
Maybe chopping is turned off; press n to open TreeChop's in-game settings, then toggle on the "chopping" setting. If chopping is enabled and changing tools doesn't help, then there might be a conflict with another mod. If you send me a recent log, I'll try to fix it.

8. Why do some trees leave behind floating leaves when felled?
Either
a) it's a modded tree and its leaves are not set up properly. Let me know what type of tree is misbehaving, and I'll politely inform the mod owners.
b) there are too many leaves! You can increase the max number of leaves by going to [your minecraft folder]/config/treechop-common.toml and increasing maxLeavesBlocks.

9. Why do some trees leave behind floating logs when felled?
Either
a) it's a modded tree and is weirdly shaped. Let me know, and I'll try to make TreeChop do a better job of detecting that type of tree.
b) the tree is too big! You can increase the max tree size by going to [your minecraft folder]/config/treechop-common.toml and increasing maxTreeBlocks.

10. How do I disable mushroom and fungus chopping?
Go to [your minecraft folder]/config/treechop-common.toml and change
    blockTagForDetectingLogs = "treechop:choppables"
to
    blockTagForDetectingLogs = "treechop:choppables_except_mushrooms"
If you want more control over which blocks can be chopped, you have to make your own datapack and fiddle with the block tags (see https://minecraft.gamepedia.com/Tag for more info).

12. Why am I not seeing the [fill in the blank] feature?
Only the newest version of Minecraft 1.16 is fully supported. Some older versions, especially 1.12.2, lack some of the fancier features.

11. Can I include this in a modpack?
Yes!

Changelog:

0.16.3:
- Fix server crash
- Fix logger not mentioning "TreeChop"
- [Fabric] Fix lighting issues with Starlight (https://modrinth.com/mod/starlight)
- [Fabric] Better rendering with Sodium (https://modrinth.com/mod/sodium)
- [Fabric 1.18.2] Add support for Jade (https://www.curseforge.com/minecraft/mc-mods/jade)
- [Fabric 1.18.2] Add support for WTHIT (https://www.curseforge.com/minecraft/mc-mods/wthit)

0.16.2:
- Fix minor visual issues
- Remove unnecessary config settings

0.16.1:
- [Fabric] Fix invisible logs when using Sodium (https://modrinth.com/mod/sodium)
- [Fabric] Fix crash when using Sodium + Iris Shaders (https://modrinth.com/mod/iris)
- [Fabric] List Forge Config API Port as a dependency (https://www.curseforge.com/minecraft/mc-mods/forge-config-api-port-fabric)

0.16.0:
- Optimize Jade/WTHIT plugins
- Remove overrides system (other mods can use TreeChop's API to adapt item behavior)
- Spruce up tooltips

0.15.8:
- Update to Minecraft 1.19.1
- Add Jade support
- Add WTHIT support
- Minor bug fixes

0.15.7:
- Fixed particle textures

0.15.6:
- Fixed conflicts with CarryOn
- Fixed chopping issues on interior logs
- Fixed chopped logs sometimes not dropping loot
- Fixed texture issues when chopping stripped logs
- Fixed conflict with No Tree Punching
- Fixed rendering conflicts when chop indicator appears

0.15.5:
- Fixed crash on Forge 39.0.45+

0.15.4:
- Fixed chopped log textures not persisting across save/load

0.15.3:
- Fixed chop indicator not reappearing after sneaking

0.15.2:
- Fixed crashes when chopping for some users

0.15.1:
- Fixed inability to chop blocks with empty hands
- Fixed chop indicator flickering

0.15.0:
- Use the appropriate stripped log textures for chopped logs
- Chopped blocks inherit the properties (such as break speed) of the original block (mostly affects mushrooms)
- Chopped blocks can overlap with water
- Fixed items being dropped on first chop; they are now dropped when the chopped log block is destroyed
- Added tooltips in settings screen
- Removed excessive error messages

0.14.6:
- Added Botania's Terra Truncator to the default tools blacklist

0.14.5:
- Added Russian localization
- Fixed missing loot table
- Allow requiring more than one chop per block when using the `linear` algorithm

0.14.4:
- Fixed leafless trees not getting chopped when `treesMustHaveLeaves` is off
- (0.12.2 only) Add ProjectMMO compatibility

0.14.3:
- Fixed tags-related conflict with various mods, including The Undergarden

0.14.2:
- Disabled chopping for non-player entities (e.g. modded machines) by default
- Added configurable chop settings for non-player entities

0.14.1:
- Fixed conflict with Dynamic Trees
- Fixed conflict with Project MMO 1.16.5

0.14.0:
- Added on-screen chop indicator
- Added in-game settings screen (press N to open)
- Requiring trees to have leaves is now the default setting
- Ignore leaves placed by players (this is configurable)
- Added config option to change chopping items blacklist to a whitelist
- Better compatibility with Tinker's Construct and other mods
- Added configurable overrides list to change how items behave when chopping
- Added configurable permissions for player settings
- Added localization for all text
- Added API for other mods to make use of TreeChop's chopping mechanics

0.13.0:
- Changed how TreeChop computes the number of chops required to fell a tree
- Added more configuration options for computing the number of chops required to fell a tree
- Better compatibility with Carry On versions carryon-1.16.5-1.15.2.9 and up

0.12.1:
- Fixed server crash on startup

0.12.0:
- Added procedural chopped log models
- Added compatibility with Project MMO
- Added option to show chopped texture on interior tree blocks instead of bark
- Added option to allow persistent leaves to be broken when felling
- Added option to disable chopping in creative
- Fixed issues with chopping interior logs on really big (3x3+) trees
- Fixed chopping getting semi-permanently deactivated for specific players
- Fixed sneak settings not getting saved
- Fixed mod display name
- Organized configs

0.11.3:
- Fixed conflict with CarryOn that caused pickup attempts to trigger chops

0.11.2:
- Fixed non-standard keys causing unbound controls to trigger
- Prevent players from disabling felling when `canChooseNotToChop=true`
- Show players a message when trying to change chop behavior when `canChooseNotToChop=false`

0.11.1:
- Fixed a crash when using Mekanism tools (and probably other modded items)
- Fixed the chopping tools blacklist getting reset to the default value on startup

0.11:
- Added client-side config option to only chop "trees" with "leaves"
- Added optional `treechop:choppables_except_mushrooms` block tag to disable chopping on mushrooms
- Let xp-dropping logs drop xp when felled
- Fixed fortune and silk touch enchantment effects not getting applied (only for blocks you chop, not felled blocks)
- Fixed occasional crashes when chopping with modded log-breaking items
- Fixed client-side config sometimes not syncing properly when joining a server
- Rewrote tree detection code to be more stable and maintainable
- Ported to 1.12.2

0.10:
- Fixed startup crash on dedicated servers

0.9:
- Fixed chopped blocks not spawning drops (again)
- Added keybinding to toggle chopping on and off
- Added keybinding to toggle felling on and off
- Added keybinding to change the effect sneaking has on chopping
- Added configurable blacklist to prevent chopping when holding certain items

0.8:
- Added config option `enabled` to disable chopping
- Added config option `canChooseNotToChop` to prevent players from not chopping
- Fixed crash when using tools from Silent's Gear (and possibly other mods)
- Fixed inability to break chopped logs without chopping

0.7:
- Fixed chopped blocks not spawning drops

0.6:
- Fixed chopping not draining item durability
- Fixed chopping not causing exhaustion
- Fixed chopping not dropping experience

0.5:
- Mushroom caps, fungus warts, and shroomlights break when felling
- Diagonal tree junctions are now choppable
- Breaking a single log destroys connected leaves
- Don't spawn drops in creative
- Any blocks with minecraft:leaves or treechop:leaves_like tags are treated as leaves
- Any blocks with minecraft:logs or treechop:choppable tags are treated as logs
- Can configure the block tag used to detect logs and leaves

0.4:
- Added configurability

0.3:
- Added limit to number of sounds played when a tree is felled
- Improved chop overflow block selection

Sample config:

treechop-common.toml


[permissions]
 #Whether this mod is enabled or not
 enabled = true

 [permissions.choppingEnabled]
  canBeFalse = true
  canBeTrue = true

 [permissions.fellingEnabled]
  canBeFalse = true
  canBeTrue = true

 [permissions.sneakBehavior]
  canBeNone = true
  canBeInvertFelling = true
  canBeInvertChopping = true

 [permissions.treeMustHaveLeaves]
  canBeFalse = true
  canBeTrue = true

 [permissions.chopInCreativeMode]
  canBeFalse = true
  canBeTrue = true

[general]
 #Whether to drop loot for blocks that have been chopped
 loseLootForChoppedBlocks = true

[treeDetection]
 #Maximum number of log blocks that can be detected to belong to one tree
 #Range: 1 ~ 8096
 maxTreeBlocks = 320
 #Maximum number of leaves blocks that can destroyed when a tree is felled
 #Range: 1 ~ 8096
 maxLeavesBlocks = 1024
 #Whether to destroy leaves when a tree is felled
 breakLeaves = true
 #Whether non-decayable leaves are ignored when detecting leaves
 ignorePersistentLeaves = true
 #Maximum distance from log blocks to destroy non-standard leaves blocks (e.g. mushroom caps) when felling
 #Range: 0 ~ 16
 maxBreakLeavesDistance = 7
 #The tag that blocks must have to be considered choppable (default: treechop:choppables)
 blockTagForDetectingLogs = "treechop:choppables"
 #The tag that blocks must have to be considered leaves (default: treechop:leaves_like)
 blockTagForDetectingLeaves = "treechop:leaves_like"

[chopCounting]
 #Method to use for computing the number of chops needed to fell a tree
 #Allowed Values: LINEAR, LOGARITHMIC
 algorithm = "LOGARITHMIC"
 #How to round the number of chops needed to fell a tree; this is more meaningful for smaller trees
 #Allowed Values: DOWN, NEAREST, UP
 rounding = "NEAREST"
 #Whether felling a tree can require more chops than the number of blocks in the tree
 canRequireMoreChopsThanBlocks = false

 #See https://github.com/hammertater/treechop/#logarithmic
 [chopCounting.logarithmic]
  #Determines the number of chops required to fell a tree; higher values require more chops for bigger trees
  #Range: 0.0 ~ 10000.0
  a = 10.0

 #See https://github.com/hammertater/treechop/#linear
 [chopCounting.linear]
  #The number of chops per block required to fell a tree; if chopsPerBlock = 0.5, it will take 50 chops to fell a 100 block tree
  #Range: 0.0 ~ 1.0
  chopsPerBlock = 1.0
  #The base number of chops required to fell a tree regardless of its size
  #Range: -10000.0 ~ 10000.0
  baseNumChops = 0.0

[compatibility]

 [compatibility.general]
  #Whether to prevent chopping during right-click actions
  preventChoppingOnRightClick = false
  #Whether to prevent infinite loops when chopping; fixes crashes when using modded items that break multiple blocks
  preventChopRecursion = true

  [compatibility.general.blacklist]
   #Whether the listed items should be blacklisted or whitelisted
   #Allowed Values: BLACKLIST, WHITELIST
   blacklistOrWhitelist = "BLACKLIST"
   #List of item registry names (mod:item), tags (#mod:tag), and namespaces (@mod) for items that should not chop when used to break a log
   #- Items in this list that have special support for TreeChop will not be blacklisted; see https://github.com/hammertater/treechop/blob/main/docs/compatibility.md#blacklist
   items = ["botania:terra_axe", "mekanism:atomic_disassembler", "@lumberjack", "practicaltools:iron_greataxe", "practicaltools:golden_greataxe", "practicaltools:diamond_greataxe", "practicaltools:netherite_greataxe"]

  [compatibility.general.overrides]
   #List of item registry names (mod:item), tags (#mod:tag), and namespaces (@mod) for items that should not perform their default behavior when chopping
   #- Add "?chops=N" to specify the number of chops to be performed when breaking a log with the item (defaults to 1)
   #- Add "?override=always" to disable default behavior even when chopping is disabled
   #- Add "?override=never" to never disable default behavior
   #- Items in this list that have special support for TreeChop will not be overridden; see https://github.com/hammertater/treechop/blob/main/docs/compatibility.md#overrides
   #- This might not work as expected for some items; see https://github.com/hammertater/treechop/blob/main/docs/compatibility.md#caveats
   items = ["#tconstruct:modifiable/harvest", "silentgear:saw?chops=3,override=always"]

  #The chop settings used by non-player entities, such as robots and machine blocks
  [compatibility.general.fakePlayerChopSettings]
   #Use with caution! May cause conflicts with some mods, e.g. https://github.com/hammertater/treechop/issues/71
   choppingEnabled = false
   #Felling only matters if chopping is enabled; probably best to leave this on
   fellingEnabled = true
   treesMustHaveLeaves = true


treechop-client.toml


[chopping]
 #Default setting for the effect that sneaking has on chopping (can be cycled in-game)
 #Allowed Values: NONE, INVERT_CHOPPING, INVERT_FELLING
 sneakBehavior = "INVERT_CHOPPING"
 #Whether to ignore trees without connected leaves
 treesMustHaveLeaves = true
 #Whether to enable chopping when in creative mode (even when false, sneaking can still enable chopping)
 chopInCreativeMode = false
 #Default setting for whether or not the user wishes to chop (can be toggled in-game)
 choppingEnabled = true
 #Default setting for whether or not the user wishes to fell tree when chopping (can be toggled in-game)
 fellingEnabled = true

[visuals]
 #Whether to use procedural chopped log models; disable to use models added by a resource pack
 useProceduralChoppedModels = true
 #Whether to replace the interior sides of logs with a chopped texture instead of bark
 removeBarkOnInteriorLogs = true

 [visuals.choppingIndicator]
  #Vertical location of the indicator relative to the player's crosshairs; positive values move the indicator down
  #Range: -256 ~ 256
  yOffset = 0
  #Horizontal location of the indicator relative to the player's crosshairs; positive values move the indicator to the right
  #Range: -256 ~ 256
  xOffset = 16
  #Whether to show an on-screen icon indicating whether targeted blocks can be chopped
  enabled = true

[settingsScreen]
 #Whether to show chat confirmations when using hotkeys to change chop settings
 showFeedbackMessages = true
 #Whether to show in-game options for enabling and disable felling
 showFellingOptions = false
 #Whether to show tooltips in the settings screen
 showTooltips = true