多功能垃圾炮
将你的废品变成弹药。垃圾炮是一款完全可配置的多功能枪械,可以发射你装入的任何物品:用于击杀怪物、破坏和放置方块、用鱼钩将目标拉回,或者像便携漏斗一样吸取物品。每种行为都可以针对每把枪或全局进行调节。
概述
- 弹药即是你放入其中的任何东西:任何物品都可以加载到炮的 27 格容器中并作为投射物发射。
- 手持垃圾炮时按 G 键(可重新绑定)打开容器,或使用容器上方的“加载弹药”/“清空弹药”按钮。
- 右键点击以发射,按住右键以持续发射,发射速率可在配置中调整(默认:每次射击间隔 5 刻,约每秒 4 发)。
- 仅在主手生效;副手无效。
- 潜行 + 右键点击可将垃圾炮作为方块放置;挖掘它会回收这把枪,且保留所有附魔、单枪设置和拾取过滤器。
可配置的弹道
重力、投射物速度、生成偏移量、伤害(非堆叠物品与具有单独最小/最大值的堆叠物品区分)以及射速均可配置。最小伤害永远不会超过最大伤害——配置会自动修正此问题。每个值都可以针对每把枪或作为全局默认值设置:
/trashcannon config - 打开你手中所持枪械的配置 GUI(需要 OP 权限,必须手持垃圾炮)。
/trashcannon globalconfig - 打开全局默认配置(需要 OP 权限)。
/trashcannon help - 为每位玩家打开一个可滚动的游戏内指南。
命中行为(每枪或全局开关)
- 特殊投射物作为子弹:当禁用时(默认),箭、雪球、鸡蛋、末影珍珠、药水、火焰弹和三叉戟保持原版行为。启用后,它们将作为普通的炮弹飞行,使用垃圾炮的伤害、重力和速度。
- 放置方块:方块弹药击中时会放置在它击中的方块面上,而不仅仅是造成伤害。击中实体时仍正常造成伤害。
- 投掷掉落:弹药落地成为正常的掉落物,而不是造成伤害或消失。如果击中的玩家背包有空闲空间,物品会直接进入其背包,否则掉落在地上。这会覆盖伤害、方块放置和喂食效果。
- 破坏方块:子弹会对方块造成伤害。所需击中次数取决于硬度:ceil(5 + hardness + 5 * ln(1 + hardness)) —— 软方块至少需要 5 次击中,硬方块则按对数曲线缩放。如果在 5 秒内未再次击中同一方块,进度会重置。仅影响那些通常可以被破坏和掉落的方块。效率附魔减少所需击中次数;精准采集和抢夺附魔影响掉落物。此功能优先级高于方块放置。
- 喂食:食物和可饮用弹药会用于击中它的生物——繁殖动物并让幼崽长大,治愈或驯服狼和猫,应用药水效果,或喝牛奶清除效果。不可食用的弹药仍正常造成伤害。
- 交互:弹药右键点击它所击中的任何物体,就像玩家使用它一样:剪羊毛、拴绳拴住生物、驯服动物、挤奶、填充/倒空桶等。这是“命中时喂食”之后的最低优先级。
- TNT 弹药:TNT 子弹始终以引燃 TNT 的形式发射并爆炸——不受上述任何开关的影响。
工具弹药:钓鱼竿 & 拴绳
- 钓鱼竿:鱼竿会抛出一个钩子(带有线)。再次右键点击会将击中的目标拉回你身边。仅消耗鱼竿的耐久度,并尊重其自身的耐久附魔。启用“拉动方块”后,被钩住的方块会被拖回并放置;如果卡住,则停在哪里就放在哪里。
- 拴绳:拴绳会发射一个绳结;再次右键点击会将你拉向目标(实体或方块)。到达目的地后消耗一根拴绳。如果拉动过程中卡住,会在短暂延迟后取消。
拾取过滤器
- 选择你想要的任何物品 ID:匹配的地上物品会优先被吸入携带的垃圾炮中(如果有空间),其余部分则按正常方式进入你的背包。
- 可以完全关闭此功能(“在拾取时使用过滤器”),这样所有物品都会正常拾取。
- 每把枪都可以拥有自己的过滤器;否则使用全局过滤器。两个过滤器编辑器都包含搜索框(名称或 ID)、单项复选框、“仅显示已添加”模式以及可滚动列表。
- “重置为全局”会清除该枪的独立过滤器,使其继承全局列表。
吸取(需要精准采集)
- 启用后,右键点击会将附近的物品吸入垃圾炮中。范围(默认 8 格)、持续时间(默认 60 秒)和冷却时间(默认 30 秒)均可配置。
- 你可以在吸取时移动;吸力中心会跟随你且不会重置。
- 启用“将拾取过滤器应用于吸取”时,你可以选择仅吸取物品、仅吸取方块或两者兼有——否则范围内所有地上的物品都会被吸入。
- “反转过滤器(黑名单)”会翻转过滤器在所有使用场景中的作用:正常拾取、加载弹药和吸取都将作用于列表上物品/方块之外的所有内容。
- 方块以其方块形式被吸入。容器会保留其内容物;携带其他容器的容器会被跳过以防止数据膨胀。
- 当持续时间结束、枪已满或你再次右键点击时,吸取停止,然后进入冷却时间——伴有声音、字幕和聊天反馈。
- 吸取具有最高优先级:当处于激活状态时,垃圾炮绝不会发射子弹。
附魔
- 精准采集:启用吸取功能(否则吸取按钮呈灰色不可用)。
- 效率:加快吸取速度并减少破坏方块所需的击中次数。
- 抢夺 / 精准采集:改善破坏方块时的掉落物。
- 力量 / 火焰 / 击退 / 穿透 / 抢夺:增强战斗弹药的威力。
- 耐久:不消耗弹药的几率。作为一种防止刷物品的措施,它仅适用于纯消耗的弹药——那些可以返回或掉落物品的功能(投掷掉落、放置方块、喂食、交互、可恢复的特殊投射物)始终会消耗弹药。
放置的垃圾炮与安全
- 大炮可以以方块形式放置(潜行+右键)。活塞可以推动它,并且它会掉落为物品。
- 将大炮放入另一个大炮中会触发警告并启动爆炸倒计时——在计时结束前将其移除可取消爆炸。内部的大炮越多,爆炸威力越大。
- 被大炮摧毁的船和矿车会以自身物品的形式掉落。
配置与多人游戏
- 单门大炮的设置会覆盖全局默认值。启用“强制使用全局配置”后,所有大炮都将使用全局设置,单门大炮的开关将失效。
- “允许单门大炮切换”控制容器界面中的开关是否可更改(否则它们仍会显示但呈灰色不可用状态)。
- 全局设置会从服务器同步,因此其他玩家会看到相同的开关状态。
- 游戏内指南(
/trashcannon help)支持双语(英文和简体中文),并根据玩家的游戏语言自动切换。
Multi-Function Trash Cannon
Turn your junk into ammo. The Trash Cannon is a fully configurable multi-purpose gun that fires whatever you load into it: fight mobs, break and place blocks,pull targets back with a fishing hook, or vacuum up items like a portable hopper.Every behaviour can be tuned per gun or globally.
Overview
- Ammo is whatever you put inside: any item can be loaded into the cannon's 27-slot container and fired as a projectile.
- Open the container with the G key (rebindable) while holding the cannon, or use the "Load ammo" / "Clear ammo" buttons above the container.
- Right-click to fire, hold right-click to keep firing at a configurable rate (default: 5 ticks between shots, about 4 shots per second).
- Works only in the main hand; the offhand does nothing.
- Sneak + right-click places the cannon as a block; mining it returns the gun with all enchantments, per-gun settings and pickup filters intact.
Configurable ballistics
Gravity, projectile speed, spawn offset, damage (unstackable items vs. stackable items with separate min/max) and fire rate are all configurable. The minimum damage is never allowed to exceed the maximum - the config corrects it automatically. Each value can be set per gun or as a global default:
/trashcannon config - opens the config GUI for the gun you are holding (OP required, must hold the cannon).
/trashcannon globalconfig - opens the global default config (OP required).
/trashcannon help - opens a scrollable in-game guide for every player.
On-hit behaviours (per-gun or global toggles)
- Special projectiles as bullets: when disabled (default), arrows, snowballs, eggs, ender pearls, potions, fire charges and tridents keep their vanilla behaviour. When enabled, they fly as plain cannon bullets using the cannon's damage, gravity and speed.
- Place blocks: block ammo is placed on the block face it hits instead of just dealing damage. Hitting an entity still deals damage normally.
- Throwable drop: ammo lands as a normal dropped item instead of dealing damage or disappearing. If the hit player has free inventory space it goes straight into their inventory, otherwise it drops on the ground. Overrides damage, block placement and feeding.
- Break blocks: bullets damage blocks. The hits needed depend on hardness: ceil(5 + hardness + 5 * ln(1 + hardness)) - soft blocks need at least 5 hits and hard blocks scale with a log-like curve. Progress resets if the same block is not hit for 5 seconds. Only blocks that can normally be broken and dropped are affected. Efficiency reduces the hits needed; Silk Touch and Fortune affect the drops. Takes priority over block placement.
- Feed: food and drinkable ammo is used on the creature it hits - breed animals and grow up babies, heal or tame wolves and cats, apply potion effects, or drink milk to clear effects. Non-edible ammo still deals damage normally.
- Interact: ammo right-clicks whatever it hits as if the player used it: shear sheep, leash mobs, tame animals, milk cows, fill/empty buckets and more. Lowest priority after feed-on-hit.
- TNT ammo: TNT bullets are always launched as primed TNT that explodes - never affected by the toggles above.
Tool ammo: fishing rod & lead
- Fishing rod: the rod casts a hook (with line). Another right-click pulls the hit target back to you. Only the rod's durability is spent, respecting its own Unbreaking enchant. With "pulled blocks" enabled, a hooked block is dragged back and placed; if it gets stuck it is placed where it stops.
- Lead: the lead launches a knot; another right-click pulls you to the target (entity or block). One lead is consumed when you arrive. If the pull gets stuck it cancels after a short while.
Pickup filter
- Choose any item IDs you want: matching ground items are picked into a carried cannon first (if it has room), and the rest goes to your inventory as usual.
- Can be turned off entirely ("use filter on pickup"), so everything is picked up normally.
- Each gun can have its own filter; otherwise the global filter is used. Both filter editors have a search box (name or ID), per-item checkboxes, "only show added" mode and a scrollable list.
- "Reset to global" clears the gun's own filter so it inherits the global list.
Suck (requires Silk Touch)
- While enabled, right-click vacuums nearby items into the cannon. Radius (default 8 blocks), duration (default 60 s) and cooldown (default 30 s) are configurable.
- You can move while sucking; the suction centre follows you and never resets.
- With "apply pickup filter to suck" you choose between items only, blocks only, or both - otherwise every ground item in range is sucked.
- "Invert filter (blacklist)" flips the filter everywhere it is used: normal pickup, Load ammo and Suck all act on everything EXCEPT the items/blocks on the list.
- Blocks are sucked in as their block form. Containers keep their contents; containers carrying other containers are skipped to prevent data bloat.
- Suction ends when the duration runs out, the gun is full, or you right-click again, then it goes on cooldown - with sound, subtitles and chat feedback.
- Suck has the highest priority: while it is on, the cannon never fires bullets.
Enchantments
- Silk Touch: enables the Suck feature (the suck button is greyed out otherwise).
- Efficiency: faster suction and fewer hits needed to break blocks.
- Fortune / Silk Touch: improve block drops when breaking blocks.
- Power / Flame / Punch / Piercing / Looting: boost combat ammo.
- Unbreaking: chance to not consume ammo. As an anti-duplication measure, it only applies to ammo that is purely consumed - features that can return or drop items (throwable drop, place blocks, feed, interact, recoverable special projectiles) always consume the ammo.
Placed cannon & safety
- The cannon can be placed as a block (sneak + right-click). Pistons can push it and it drops as an item.
- Putting a cannon inside a cannon triggers a warning and an explosion countdown - remove it before the timer ends to cancel. The more cannons inside, the bigger the boom.
- Boats and minecarts destroyed by the cannon drop themselves as items.
Configuration & multiplayer
- Per-gun values override global defaults. With "force global config" enabled, every cannon uses the global values and per-gun switches become inactive.
- "Allow per-gun toggles" controls whether the container screen switches can be changed (they are still shown but greyed out otherwise).
- Global settings are synced from the server, so other players see the same switch states.
- The in-game guide (
/trashcannon help) is bilingual (English & Simplified Chinese) and follows the player's game language.
评论 0
登录后参与评分
还没有评论,来抢沙发吧