TreeChop
想要更轻松地砍伐树木吗?使用 TreeChop 即可实现!
- 你需要树木在一次或多次挥砍后倒下吗?
- 支持数据添加的任何自定义树,例如 _William Wyther's datapack。
- 适用于 Minecraft 1.17+
- 针对大型服务器进行了优化。
- 按块尊重保护机制(WorldGuard、领地...)。
- 你可以在
lang/ 文件夹中添加你的翻译文件。
- 可配置 - 默认情况下,树木必须被击中多次才能倒下(你也可以让它像 TreeCapitator 一样工作:详见页面底部)。
除非你的基地是一棵树,否则它不会被意外摧毁。你还可以使用 /tc toggle,或者简单地 蹲下 + 右键点击 空气来操作。
随意用斧头砍树吧!: )
砍伐橡树

注意:
原始项目在 CrashPlugin. 上创建
自 3.0.0 版本起,更新检查使用 Modrinth API(可以在配置中禁用:Updates.check)。
Modrinth 页面 - bStats
命令:
只有当你拥有相应的权限时,TreeChop 命令才会可见,具体权限如下。
/treechop 别名:/tc
/tc toggle [on/off] [player] 玩家切换 TreeChop 的命令。
/tc help ... 帮助查看命令。
/tc enabled <true/false> 启用或禁用插件。
/tc pluginInfo 查看插件信息(插件版本等)。
/tc reloadconfig 如果你编辑了配置文件,请使用此命令。
/tc config <...> 编辑或查看配置。
权限:
g031.command.treechop.*: 所有 TreeChop 命令的权限。
g031.command.treechop.config: 管理员配置插件的命令。(默认仅限管理员)
g031.command.treechop.enable: 管理员启用或禁用插件的命令。(默认仅限管理员)
g031.command.treechop.self_toggle: 玩家切换 TreeChop 的命令。(默认所有玩家可用)
g031.command.treechop.toggle: 玩家为其他玩家切换 TreeChop 的命令。(默认仅限管理员)
g031.treechop.chop: 用于开始砍伐事件。(默认所有玩家可用)
你需要使用权限插件,如 luckperms,来管理权限。
要决定谁可以使用此功能,你可以禁用 g031.treechop.chop 权限,并通过奖励系统或手动方式授予玩家。
配置文件 (3.0.0, 格式 v6):
配置文件在首次启动时生成,并带有内联注释,并且会自动迁移自旧版本(你的值会被保留;旧的 percentageChop 变为 hardnessFormula)。
默认配置 v6
# 指示配置文件版本。不要修改此参数(否则可能导致文件重置)。
ConfigVersion: 6
# 指示插件是否启用(监听 BlockBreakEvent 事件)。
TreeChopEnabled: true
# 从 lang/ 文件夹中使用的语言文件(已包含:en、it)。缺失的键将回退到英文。
Language: en
# 决定谁可以使用 TreeChop。
# 如果 permission 为 true,玩家必须拥有权限列表中的至少一个权限。
# 免责声明:权限列表越大,对每个玩家的检查次数就越多!
WhoCanChop:
permission: true
permissions:
- g031.treechop.chop
# treeCollecting_Mode = (0 仅收集初始类型的原木), (1 仅 LOG 和 WOOD), (2 仅 LOG、WOOD 和 STRIPPED), (3 任意类型的木材)。
# maxBlocks = (默认值:2048) 每棵树可收集方块的安全上限。
# maxWidth = (默认值:16) 水平尺寸超过此值时,木质结构将被判定为“非树木”,扫描将提前停止,从而节省对原木墙和建筑物的处理工作。
# 仅在尚未看到自然树叶时生效,因此真实树木不受影响。如果你使用非常宽的自定义树木,请提高此值;设为 0 表示无限制。
# noTreeCacheTime = (默认值:30) 木质结构被记住为“非树木”的秒数:再次击打它时不会重新扫描。设为 0 表示始终重新扫描。
# enabledWorlds = TreeChop 生效的世界列表(空列表 = 所有世界)。
# excludedLogs = TreeChop 忽略的原木材质名称列表(例如 [OAK_LOG, DARK_OAK_WOOD])。
Collecting:
treeCollecting_Mode: 1
maxBlocks: 2048
maxWidth: 16
noTreeCacheTime: 30
enabledWorlds: []
excludedLogs: []
# 在砍树期间。
# shiftDisableChop = 潜行时禁用砍伐动作。
# shiftRightToggle = 潜行 + 手持斧头右键点击空气,切换你自己的 TreeChop 状态(与 '/tc toggle' 命令相同)。
# useMultipleAxes = 默认设为 false,以防止损坏错误的工具。
# chopAllLogs = 如果为 true,它将破坏所有树干原木(物理效果忽略此项:只有悬挂的部分会掉落)。
# treeCutting_Mode = 砍伐模式:
# 0 HITS = 每次一击,次数由 hardnessFormula 决定。
# 1 PHYSICS = 不取消任何操作,你自己打破砍伐区域内的原木,剩余悬挂的部分自动掉落(黑橡木需要其 4 次砍击)。hardnessFormula、chopAllLogs 和 damagedLogs 不适用。
# 2 HARDNESS = 单次砍击,但持续时间更长:按住按钮,公式变为硬度乘数,因此更好的斧头仍然切得更快。松开按钮后,原木会恢复。
# 从 1.20.5 版本开始,原木对客户端来说确实更难破坏(一次长打断);旧版本则计算重复打断,总时间相同。
# hardnessFormula = 所需打击次数的公式(向下取整)。变量:logs(掉落的原木)、chop(砍伐区域)、height(树高)。
# 函数:min, max, ceil, floor, round, sqrt, abs。例如 'logs * 0.8', 'ceil(sqrt(logs) * 3)'。
# insufficientAxeDurability = 当工具的耐久度低于总原木数时发出通知。
OnChop:
shiftDisableChop: true
shiftRightToggle: true
useMultipleAxes: false
chopAllLogs: false
treeCutting_Mode: 0
hardnessFormula: logs * 0.8
insufficientAxeDurability: true
# 砍伐区域的裂纹。在 PHYSICS 模式下未使用:因为没有进度显示。
# othersView = 其他玩家能否看到受损方块的效果。
# radius = 其他玩家能看到该效果的半径范围。
# mode = 裂纹通道:(0 按玩家独立:裂纹跟随每位玩家正在砍伐的区域) (1 共享:所有人对同一方块的裂纹相同)。
damagedLogs:
othersView: true
radius: 32
mode: 0
# 在树木倒下期间。
# axeBreakStopFall = 在树木倒下过程中,如果工具损坏,它会中断对其他原木的破坏。
# saveToolDurability = 选择你想保留的工具耐久度数量。
# durabilityPerLog = 每破坏一根原木的工具伤害:-1 = 原版行为,0 = 无消耗,N = 每根原木恰好 N 点伤害(覆盖无损附魔)。
# breakLogsMode = (0 无序破坏方块) (1 根据 Y 轴自下而上破坏方块)。
# breakLogsPerTick = 每秒刻破坏多少根原木的值。如果设为 '0',则为瞬时完成,但可能影响性能。
# fallMode = 下落动画:(0 标准) (1 吸力 = 随着原木破碎,装饰性掉落方块被吸入砍伐中心;仅视觉效果,稍重一些)。
# hungerPerLog = 每砍倒一根原木,给砍伐者增加的饥饿值(支持小数,例如 0.5)。设为 0 表示无消耗。
# xpPerLog = 每砍倒一根原木,给予玩家的经验点数(小数;总数向下取整)。设为 0 表示无奖励。
OnFall:
axeBreakStopFall: true
saveToolDurability: 0
durabilityPerLog: -1
breakLogsMode: 1
breakLogsPerTick: 2
fallMode: 0
hungerPerLog: 0.0
xpPerLog: 0.0
# 树木倒下时的自然树叶处理。
# 树叶不是由玩家破坏的:没有工具损耗,也没有统计记录,
# 但仍然像原木一样逐个方块进行保护检查。
# breakLeaves = 也破坏树木的自然(非玩家放置)树叶。
# leavesRadius = 从已砍倒的原木出发的连接步数(非欧几里得距离),在此范围内的树叶会被收集。
# breakLeavesMode = 破坏顺序:(0 从树干向外,按连接步数) (1 自下而上) (2 自上而下)
# (3 从外部向树干) (4 每次随机一片树叶,默认) (5 类似 0,但按实际距离排序,这是唯一涉及真实排序的顺序)。
# leavesPerTick = 每秒刻破坏的树叶数,允许小数:0.4(默认)= 每 2.5 秒刻破坏一片树叶。设为 0 表示瞬时完成,但可能影响性能。
Leaves:
breakLeaves: false
leavesRadius: 6
breakLeavesMode: 4
leavesPerTick: 0.4
# 在砍伐时生成的粒子效果和声音,'generateEffects' 必须启用。
# generateEffects = 使所有玩家都能看见并听见砍伐树木的动作。
# particlesQuantity = (默认值:40)
# soundVolume = (默认值:1.0) 声音传播距离。
# soundPitch = (默认值:2.0)
Effects:
generateEffects: true
particlesQuantity: 40
soundVolume: 1.0
soundPitch: 2.0
# 每片树叶被破坏时的效果,独立于上述砍伐效果。
# generateEffects = 树叶被破坏时生成音效和粒子效果。
# particlesQuantity = (默认值: 10) 0 = 无。
# soundVolume = (默认值: 0) 音效的传播距离,0 = 静音。
# soundPitch = (默认值: 1.0)
Leaves:
generateEffects: true
particlesQuantity: 10
soundVolume: 0.0
soundPitch: 1.0
# toInventory = 倒下的原木直接掉落至砍树器的持有者背包中(溢出部分掉落在玩家脚边)。
Drops:
toInventory: false
# 树木倒下后发生的行为。
# sapling = 在基座位置(下方有泥土的位置)重新种植树苗,最多 4 棵。
# saplingChance = 每个基座位置重新种植的概率百分比(0-100)。
Respawn:
sapling: false
saplingChance: 100
# 新版本检查(Modrinth API,仅在启动时执行一次)。
# check = 检查是否有更新的 TreeChop 版本并通知控制台。
# notifyOps = 当管理员加入时也通知他们。
Updates:
check: true
notifyOps: true
如何设置 TreeChop 使其一击砍倒整棵树? 在配置文件中设置:
OnChop/treeCutting_Mode: 2 OnChop/chopAllLogs: true Leaves/breakLeaves: true
如有任何问题或建议,请前往 Discord 留言。
- Gustruy
TreeChop
Want to cut down trees more easily? With TreeChop you can do it!
- Do you need the tree to be chopped down after one or multiple cuts?
- Supports any custom trees added by datapacks such as _William Wyther's datapack.
- Runs on Minecraft 1.17+
- Optimized for large-scale servers.
- Protections (WorldGuard, claims...) are respected block by block.
- You can add your Translations in the
lang/ folder.
- Configurable - by default trees must be hit multiple times to be chopped down (you can also make it work like a TreeCapitator: details at the bottom of the page).
No, your base will not be accidentally destroyed, unless the base is a tree. You can also use /tc toggle, or simply sneak + right-click in the air with an axe.
Use your axe on trees as you want! : )
Chop an Oak Tree

NOTE:
Original project created on CrashPlugin.
Since 3.0.0 the update check uses the Modrinth API (it can be disabled in the config: Updates.check).
Modrinth Page - bStats
Commands:
TreeChop commands are only visible if you have the appropriate permissions, mentioned below.
/treechop alias: /tc
/tc toggle [on/off] [player] command for a player to toggle TreeChop.
/tc help ... for help on the commands.
/tc enabled <true/false> to enable or disable the plugin.
/tc pluginInfo for plugin information (plugin version...).
/tc reloadconfig if you have edited the config file, use this.
/tc config <...> to edit or view the configuration.
Permission:
g031.command.treechop.*: permission for all TreeChop commands.
g031.command.treechop.config: operator command to configure plugin. (default on only op)
g031.command.treechop.enable: operator command to enable or disable the plugin. (default on only op)
g031.command.treechop.self_toggle: command for a player to toggle TreeChop. (default on all players)
g031.command.treechop.toggle: command for a player to toggle TreeChop for players. (default on only op)
g031.treechop.chop: used to start chop event. (default on all players)
You need to use a permission plugin, such as luckperms, to manage permissions.
To decide who can use this mechanic, you can disable the g031.treechop.chop permission and give it to players with some reward system or manually.
Config File (3.0.0, format v6):
The config is generated with inline comments on the first start and migrates automatically from older versions (your values are preserved; the old percentageChop becomes a hardnessFormula).
Default Config v6
# Indicates the version of the configuration file. DO NOT TOUCH the parameter (risk of file reset).
ConfigVersion: 6
# Indicates whether the plugin is active (listens to the BlockBreakEvent).
TreeChopEnabled: true
# Language file to use from the lang/ folder (included: en, it). Missing keys fall back to en.
Language: en
# Decide who can use treechop.
# If permission is true, the players must have one of the permissions in the permissions list.
# Disclaimer: the bigger the list of permissions, the more checks per player will be made!
WhoCanChop:
permission: true
permissions:
- g031.treechop.chop
# treeCollecting_Mode = (0 only logs of the initial type), (1 only LOG and WOOD), (2 only LOG, WOOD, and STRIPPED), (3 any type of wood).
# maxBlocks = (default: 2048) safety cap of blocks collected per tree.
# maxWidth = (default: 16) horizontal size beyond which a wooden structure is declared 'not a tree' and the scan stops early, saving work on log walls and buildings.
# Only applies while no natural leaves have been seen yet, so real trees are unaffected. Raise it if you use very wide custom trees, 0 = no limit.
# noTreeCacheTime = (default: 30) seconds a wooden structure stays remembered as 'not a tree': hitting it again does not rescan it. 0 = always rescan.
# enabledWorlds = list of worlds where treechop works (empty = all worlds).
# excludedLogs = list of log material names that treechop ignores (e.g. [OAK_LOG, DARK_OAK_WOOD]).
Collecting:
treeCollecting_Mode: 1
maxBlocks: 2048
maxWidth: 16
noTreeCacheTime: 30
enabledWorlds: []
excludedLogs: []
# During tree cutting.
# shiftDisableChop = disables while sneaking, the cutting action.
# shiftRightToggle = sneak + right-click in the air with an axe toggles TreeChop for yourself (same as '/tc toggle').
# useMultipleAxes = default set to false, to prevent damaging the wrong tool.
# chopAllLogs = if it is true, it will break all the tree logs (PHYSICS ignores it: only what is left hanging falls).
# treeCutting_Mode = felling mode:
# 0 HITS = one hit each, as many as hardnessFormula asks for.
# 1 PHYSICS = nothing is cancelled, you break the logs of the cutting area yourself and whatever is left hanging falls (a dark oak needs its 4 cuts). hardnessFormula, chopAllLogs and damagedLogs do not apply.
# 2 HARDNESS = a single cut, just longer: hold the button down and the formula becomes a hardness multiplier, so a better axe still cuts faster. Let go and the log heals.
# From 1.20.5 the log is really harder for the client (one long break); older versions count repeated breaks instead, for the same total time.
# hardnessFormula = formula for the needed hits (rounded down). Variables: logs (falling logs), chop (cutting area), height (tree height).
# Functions: min, max, ceil, floor, round, sqrt, abs. e.g. 'logs * 0.8', 'ceil(sqrt(logs) * 3)'.
# insufficientAxeDurability = notify that the tool has a lower durability than the total logs.
OnChop:
shiftDisableChop: true
shiftRightToggle: true
useMultipleAxes: false
chopAllLogs: false
treeCutting_Mode: 0
hardnessFormula: logs * 0.8
insufficientAxeDurability: true
# Cracks on the cutting area. Unused in PHYSICS: there is no progress to show.
# othersView = Whether other players can see the effect of the damaged block.
# radius = Within what radius other players can see the effect.
# mode = crack channel: (0 per-player: cracks follow the area each player is cutting) (1 shared: same cracks per block for everyone).
damagedLogs:
othersView: true
radius: 32
mode: 0
# During the fall of the tree.
# axeBreakStopFall = during the fall of the tree if the tool breaks, it interrupts the breaking of other logs.
# saveToolDurability = Choose the amount of the durability you want to save of the tool.
# durabilityPerLog = tool damage per broken log: -1 = vanilla, 0 = no cost, N = exactly N damage per log (overrides Unbreaking).
# breakLogsMode = (0 breaks the blocks without following an order) (1 breaks the blocks in an upward manner according to the Y-axis).
# breakLogsPerTick = Value referring to how many logs to break per tick. If set to '0' it will be instantaneous but may impact performance.
# fallMode = fall animation: (0 standard) (1 suction = cosmetic falling blocks are vacuumed toward the cut center as the logs break; visual only, slightly heavier).
# hungerPerLog = exhaustion (hunger) added to the chopper per felled log (decimals, e.g. 0.5). 0 = none.
# xpPerLog = experience points awarded to the player for each log cut down (decimal value; the total is rounded down). 0 = none.
OnFall:
axeBreakStopFall: true
saveToolDurability: 0
durabilityPerLog: -1
breakLogsMode: 1
breakLogsPerTick: 2
fallMode: 0
hungerPerLog: 0.0
xpPerLog: 0.0
# Natural leaves handling when a tree falls.
# The leaves are NOT broken by the player: no tool damage and no statistics,
# but protections are still asked block by block, exactly like the logs.
# breakLeaves = also break the tree's natural (non player-placed) leaves.
# leavesRadius = connection steps (not euclidean distance) from the felled logs within which leaves are collected.
# breakLeavesMode = breaking order: (0 from the trunk outward, by connection steps) (1 bottom-up) (2 top-down)
# (3 from the outside toward the trunk) (4 one random leaf at a time, default) (5 like 0 but by real distance, the only order that costs a real sort).
# leavesPerTick = leaves broken per tick, decimals allowed: 0.4 (default) = one leaf every 2.5 ticks. 0 = instantaneous but may impact performance.
Leaves:
breakLeaves: false
leavesRadius: 6
breakLeavesMode: 4
leavesPerTick: 0.4
# Particles and sounds generated on chop, 'generateEffects' must be enabled.
# generateEffects = it makes the cutting action of the tree visible and audible to all.
# particlesQuantity = (default: 40)
# soundVolume = (default: 1.0) Distance of sound.
# soundPitch = (default: 2.0)
Effects:
generateEffects: true
particlesQuantity: 40
soundVolume: 1.0
soundPitch: 2.0
# Effects of each leaf breaking, independent from the chop ones above.
# generateEffects = sound and particles when a leaf is broken.
# particlesQuantity = (default: 10) 0 = none.
# soundVolume = (default: 0) Distance of sound, 0 = silent.
# soundPitch = (default: 1.0)
Leaves:
generateEffects: true
particlesQuantity: 10
soundVolume: 0.0
soundPitch: 1.0
# toInventory = items from felled logs go straight to the chopper's inventory (overflow drops at the player's feet).
Drops:
toInventory: false
# What happens after a tree is felled.
# sapling = replant a sapling on the base positions (where there is soil under), max 4.
# saplingChance = % chance per base position to replant (0-100).
Respawn:
sapling: false
saplingChance: 100
# New version check (Modrinth API, once at startup).
# check = look for a newer TreeChop version and notify the console.
# notifyOps = also notify operators when they join.
Updates:
check: true
notifyOps: true
How do I make TreeChop chop the full tree with one swing? Set in the config:
OnChop/treeCutting_Mode: 2 OnChop/chopAllLogs: true Leaves/breakLeaves: true
For any problems or suggestions, write on discord.
- Gustruy
评论 0
登录后参与评分
还没有评论,来抢沙发吧