HT's TreeChop
| HT's TreeChop |
|---|
HT's TreeChop is a NeoForge mod that replaces the normal breaking of logs with a system of chopping. A qualifying tool applies chops to a log, and the whole tree is felled once enough chops have been applied. The mod adds one block, the chopped log, and no items, mobs, structures or recipes. It matters in Fear Nightfall because every natural tree in the pack, including the trees of AdoraBuild Trees and Tree Houses, Jungle Tree Village and Moog's Trees and Log Piles, is harvested through it when a player chops rather than breaks.
Overview
TreeChop is a gameplay overhaul for tree harvesting, not a content mod. It changes what happens when a player breaks a log with a suitable tool. The first chop converts the log into a chopped log block that keeps the original log's state, and later chops accumulate on that block. When the accumulated chops reach the tree's requirement, the mod breaks every connected log and the nearby leaves in one action.
The mod has no progression. Chopping is available from the first tool a player holds, and it applies to every log in the world, not only logs placed by the mod. In Fear Nightfall it is tuned for larger trees: the tree-size cap is raised from the mod default (see In Fear Nightfall below).
Content
- Chopped Log: the only block the mod registers. It has a strength of 2.0, uses the wood sound and a bass instrument, can be ignited by lava, can be waterlogged, and has a dynamic shape. It stores the original log, its chop count, its shape and a support factor in a block entity. Each chopped log takes up to 7 chops.
- Sound:
treechop:chop_wood, with seven variants and the subtitle "Block chopped". - Items, mobs, structures, biomes and enchantments: none. The mod does not add worldgen, spawns, recipes, enchantments, effects or advancements.
- Loot: the chopped log block drops the original log when broken. The chopping loot table is empty, so chops drop nothing by default. Loot is covered in HT's TreeChop.
- Tags: the mod defines
treechop:choppables, which is empty by default and feeds the default log list, andtreechop:chopped_logs, which holds the chopped log. Bothminecraft:logs_that_burnandminecraft:mineable/axeinclude the chopped log tag, so chopped logs burn in fires and are mined by axes. - Keybinds: "Toggle Chopping" and "Cycle Sneak Behavior" are unbound by default. "Open Settings Overlay" is bound to N. See Controls and Keybinds.
- Settings overlay: four settings, Chopping, Sneak behavior, Trees must have leaves and Chop in creative mode. Changing a setting through a hotkey prints chat feedback. A chopping indicator is drawn on the crosshair.
- Commands:
/treechop chopand/treechop fellare registered only on Fabric. On NeoForge they do not exist. - Public API: other mods can register choppable blocks, leaves and chopping items through an inter-mod message, and can listen to the five chop events (detect tree, start chop, finish chop, before fell and after fell).
Mechanics
Chopping
A chop starts when a player breaks a log that matches the log list (by default #treechop:choppables and #minecraft:logs, minus bamboo, Dynamic Trees branches and Dynamic Trees trunk shells). Chopping applies only when the player wants to chop and the held tool can chop. A player wants to chop when chopping is turned on for that player, which is on by default, and when the sneak behaviour agrees. The default sneak behaviour, INVERT_CHOPPING, makes sneaking turn chopping off for that action. Breaks in creative mode are not chopped unless "Chop in creative mode" is enabled.
Each chop that does not fell the tree plays the chop sound at volume 0.3 and shows the destroy particles at the chop position. The break is cancelled and replaced by the chop, so the log is not broken in the normal way. Break speed on a chopped log is capped at a destroy progress of 0.35, which keeps chopped logs from breaking instantly.
Tree detection
The first chop on a log floods through connected logs using horizontal and upward neighbours. The flood stops at 2,048 blocks in Fear Nightfall; the mod default is 1,024, and the configurable range is 1 to 8,096. Leaves are gathered by a breadth-first search from the logs, out to 7 blocks by default (configurable from 0 to 16). Only blocks in the leaf list count as leaves. By default this is #treechop:leaves_like, #minecraft:leaves and the PAM trees leaves from the pamhc2trees mod. Leaves set to persistent are ignored by default.
A tree with no connected leaves is ignored by default, because the setting "Trees must have leaves" is on. A tree whose only leaves are persistent therefore cannot be felled by chopping.
Chop count
Each block in a tree has a support factor. Ordinary logs count as 1.0 and chopped logs as 7. The tree's mass is the sum of these factors. The chop requirement is calculated from the mass by the logarithmic algorithm, with coefficient a = 10.0, rounded to the nearest whole chop. The requirement is never higher than the number of blocks in the tree.
A linear algorithm is also available, with one chop per block and no base chops. It is not the default. The chop counts are stored for trees in a cache, so changes to the rounding and count settings take effect only after the game restarts.
Chops per swing are set by the tool. An ordinary tool gives 1 chop. The Silent Gear saw gives 5 chops, and the Apotheosis chainsaw enchantment sets the chop count to 100 when the tool is held by a real player.
Felling
When the accumulated chops reach the requirement, the final chop fells the tree. Every connected log is broken, with up to four block-break particle effects. Leaves are then processed according to the leaf setting. By default, leaves are set to decay, which sets them non-persistent at distance 7 and random-ticks them until they decay. The other options are to break them immediately or to leave them alone. Leaves with a dedicated leaf behaviour from another mod use that behaviour instead.
Drops and credit
Each chopped block drops its original log when it is broken, which is the default. The option to drop the log on the first chop, instead of on break, is off by default. Felled logs are harvested without a player by default, so no player advancement is triggered from the felling itself. The fell-credit option can instead pass the player, or the player and the tool, to the harvest, which allows enchantments and advancements to apply.
Project MMO, if installed, awards woodcutting experience for each chop. Felling awards no experience.
Tools
Chopping requires the correct tool for drops by default, but does not require a fast-breaking tool. Some tools are blacklisted by default: the Botania terra axe, the Lumberjack tools (all items in the @lumberjack namespace), the Mekanism atomic disassembler, the Practical Tools diamond, golden, iron and netherite greataxes, and the Twilight Forest giant pickaxe. Tools that have a chopping behaviour registered by their mod bypass this list. See Tools for the pack's other tool types.
Leaves and mushrooms
Leaves and logs from several other mods are classified by TreeChop. Huge mushroom stems and caps, and huge Nether fungi, count as logs and leaves. Trees from Regions Unexplored, such as those made of Ashen Wood or Magnolia Wood, are treated as trees by default, with their leaves classified as leaves. The same default applies to trees from Tropicraft, Mystic Biomes, Better Nether and Alex's Caves.
Changes to vanilla
- Logs: breaking a log with a qualifying tool chops it instead of breaking it. This is the largest behaviour change. Logs broken by hand, or with a tool that does not qualify, break normally.
- Bark: on the client, bark is removed from interior faces of chopped logs. This option is on by default and is visual only.
- Tags: the chopped log is added to the
minecraft:logs_that_burnandminecraft:mineable/axetags. - Leaves: felling sets nearby leaves to decay through random ticks, instead of the vanilla natural leaf decay.
- Sounds: the mod adds the chop sound to the sound registry.
- Loot parameters: the mod registers a loot parameter set named
treechop, with two extra required parameters on the block set.
In Fear Nightfall
- Tree detection cap: the pack raises
maxTreeBlocksfrom the mod default of 1,024 to 2,048. Giant trees had floating logs left behind by the lower cap, so the raised value means the whole tree is felled. Large trees cost more tick time when chopped, because each chop floods through the tree and the felling breaks each log separately. - Debug logging: the pack turns off the debug logging that the mod enables by default.
- Horror structures: the pack's horror structures include dead trees. See Horror and Spooky Content. Chopping them follows the same rules as any other tree, and the default leaf rules apply.
- Compatibility: Carry On is sent a blacklist entry for the chopped log, so Carry On does not pick up chopped logs.
- Tree structures: the tree structures added by the pack's other mods, such as AdoraBuild Trees and Tree Houses, Jungle Tree Village and Moog's Trees and Log Piles, are chopped like natural trees when their logs match the log list.