TACZ: Sustained Fire
English
An addon for TACZ (Timeless and Classics Zero).
Enchantments
All numbers below are defaults; every one of them lives in the config.
| ID | Name | Max | Effect |
|---|---|---|---|
sustainedfire:belt_feed |
Belt Feed | 1 | Shoot straight from all resolved ammo sources — no magazine reload. Treasure enchantment. |
sustainedfire:preheat |
Preheat | 5 | Higher heat = faster fire rate (heat-based guns), up to +40% RPM per level at full heat. |
sustainedfire:progressive_trigger |
Progressive Trigger | 5 | Fire rate ramps up during sustained fire: +15% RPM per level after 3 s of continuous shooting. |
sustainedfire:cooling_device |
Cooling Device | 10 | -10% heat per shot per level; at level 10 the gun never overheats. |
sustainedfire:air_cooling |
Air Cooling | 5 | Above 600 RPM, each level cuts heat gain by 0.2% per RPM over the threshold — can go negative (shooting cools the gun). |
Ammo Crate
A 36-slot placeable ammo container that feeds nearby guns — the centerpiece of the supply chain.
- Feeds guns within the radius (default 4 blocks) while open. Held guns draw ammo directly from it — reload or belt feed.
- Yellow outline = this crate is feeding you right now. While holding a TACZ gun, crates that are in range, open, and actually contain usable ammo for that gun get a yellow wireframe — what you see is what feeds you. Empty or closed crates stay unlit.
- Container items inside the crate (shulker boxes, backpacks, …) feed too — default on, configurable.
- The item form can also act as an ammo source while sitting in your inventory — default off, configurable.
Sophisticated Backpacks Integration (optional)
With SB installed, an Ammo Feed Upgrade becomes available:
- Crafted shapeless from a TACZ iron ammo box (
Level:0) + an SB upgrade base. - Install it into a backpack and guns draw ammo directly from the backpack's contents — toggle it in the backpack GUI's upgrade settings. One per backpack.
- Backpack contents are pushed to the carrier's client on change, so ammo counts and upgrade toggles stay accurate outside the SB GUI.
- Without SB the upgrade item and its recipe are never registered.
Backpacks worn in Curios slots are supported as well (Curios is a separate soft dependency).
Ammo source resolution
Both belt-feed shooting and reloading resolve ammo from the following combined view:
- The player's inventory (vanilla behavior)
- Container items in the inventory — shulker boxes and anything else exposing internal storage
- Backpacks with an active Ammo Feed upgrade
- Backpacks worn in Curios slots
- Placed ammo crates in range (open lid)
- Container items inside those crates
Configuration
The config file lives at sustainedfire-common.toml (COMMON config — not synced between client and server; keep both sides consistent on multiplayer servers).
[supply]
#Expand container items (shulker boxes, ...) inside the shooter's inventory as ammo sources.
#When enabled, non-upgraded Sophisticated Backpacks also feed through this switch;
#backpacks with an active Ammo Feed upgrade are governed by the upgrade alone (no double counting).
#Default false.
#供弹时是否展开玩家背包内的容器物品(潜影盒等一切自带存储格的物品)为弹药源。
#开启后,未装升级的精妙背包同样经本开关供弹;
#装启用供弹升级的背包由升级独占,弹药不重复计算;默认 false。
expandContainerItems = false
[ammo_crate]
#Ammo crate item in the player inventory feeds guns as an ammo source (fully replaces TACZ's own ammo boxes).
#Its 36-slot storage is always accessible to other mods (e.g. item pipes), regardless of this switch.
#物品态弹药箱是否作为弹药源参与供弹(完全替代 TACZ 本体弹药盒)。
#其 36 格存储始终可被其他模组(如管道)读写,不受本开关影响。
backpackUsable = false
#Search radius (blocks) for placed ammo crates when resolving reload / belt-feed ammo.
#放置态弹药箱作为换弹/弹链弹药源的查找半径(格)。
#Range: 1.0 ~ 64.0
radius = 4.0
#true = ammo crates (placed / item form / cursor / hoppers) only accept TACZ ammo and ammo boxes.
#true = 弹药箱(放置态/物品态/光标交互/漏斗)只允许装入 TACZ 弹药与弹药盒。
crateAmmoOnly = false
#Whether placed ammo crates also feed guns from container items inside them
#(shulker boxes, backpacks - anything with internal storage).
#Item-form ammo crates placed inside also feed guns (a crate inside a crate).
#放置态弹药箱是否把内部容器物品(潜影盒、背包等一切自带存储格的物品)展开为弹药源。
#放入箱内的物品态弹药箱同样参与供弹(箱中箱)。
expandContainersInside = true
[sb_sync]
#Push SB backpack contents to the carrier's client whenever they change, so ammo count / upgrade toggle stay in sync outside the SB GUI. Fixes: ghost firing after emptying, stale HUD, toggle not taking effect.
#SB 背包内容变更时主动推送给携带者客户端,GUI 外弹药计数/升级开关保持同步。
#修复:射空后假开枪、HUD 计数不刷新、GUI 内开关升级不生效(须重开背包才恢复)。
enabled = true
#Push interval in server ticks (1 = every tick, lowest latency; raise to save bandwidth on busy servers).
#推送间隔(服务端 tick):1 = 每 tick 同步一次,延迟最低;调大可节省带宽。
#Range: 1 ~ 20
intervalTicks = 1
[enchantments]
#Enchantment cost curve: min cost = costBase + costStep * (level - 1), max = min + costSpan.
#附魔经验费用曲线:min = costBase + costStep*(等级-1),max = min + costSpan(全部附魔共享)。
#Range: 0 ~ 100
costBase = 5
#Per-level cost increment.
#每级费用增量。
#Range: 0 ~ 100
costStep = 8
#Span between min and max cost at the same level.
#同等级 min 与 max 的跨度。
#Range: 0 ~ 100
costSpan = 10
[enchantments.cooling_device]
#Max level. At 10 with default reduction the gun never overheats.
#最大等级。默认削减下 10 级枪械免过热。
#Range: 1 ~ 10
maxLevel = 10
#Heat-per-shot reduction per level (0.10 = -10%/level).
#每级对单发热量增速的削减比例(0.10 = 每级 -10%)。
#Range: 0.0 ~ 1.0
perLevelReduction = 0.1
[enchantments.air_cooling]
#Max level.
#最大等级。
#Range: 1 ~ 10
maxLevel = 5
#RPM threshold above which the reduction kicks in.
#射速超过该阈值(rpm)后开始产生减免。
#Range: 0 ~ 1200
thresholdRpm = 600
#Per-level reduction per RPM over the threshold.
#每级每超出 1 rpm 的减免比例。
#Range: 0.0 ~ 1.0
perRpm = 0.002
#Lower bound of the heat multiplier. Negative = shooting actively cools the gun.
#热量缩放系数下限。负值 = 射击时主动散热。
#Range: -10.0 ~ 1.0
floor = -1.0
[enchantments.belt_feed]
#Max level.
#最大等级。
#Range: 1 ~ 10
maxLevel = 1
[enchantments.preheat]
#Max level.
#最大等级。
#Range: 1 ~ 10
maxLevel = 5
#RPM bonus per level at 100% heat (0.40 = +40%/level).
#满热度时每级射速加成(0.40 = 每级 +40%)。
#Range: 0.0 ~ 10.0
perLevelBonus = 0.4
[enchantments.progressive_trigger]
#Max level.
#最大等级。
#Range: 1 ~ 10
maxLevel = 5
#RPM bonus per level at full ramp (0.15 = +15%/level, weaker than preheat).
#满渐变时每级射速加成(0.15 = 每级 +15%,低于预热)。
#Range: 0.0 ~ 10.0
perLevelBonus = 0.15
#Continuous-fire time (ms) to reach the full bonus.
#连射积累到满加成所需时长(毫秒)。
#Range: 100 ~ 600000
rampUpTimeMs = 3000
#Gap (ms) after which continuous fire is considered a new burst.
#距上一发超过该时长(毫秒)视为新连射。
#Range: 100 ~ 600000
burstGapMs = 2000
Technical notes
- Forge 1.20.1 (47.4.10), TACZ 1.1.8-hotfix2. Sophisticated Backpacks and Curios are optional (mixin classes targeting them load conditionally).
- Zero NBT / data-pack tampering with gun items. Behavior is delivered by 10 mixin classes: 5 into TACZ —
AbstractGunItem(4 injections),GunData,GunHudOverlay,LivingEntityShoot,ModernKineticGunScriptAPI(2 injections) — and 5 into SB (content-change push sync). - The
AbstractGunIteminjections are@Inject-at-RETURN fallbacks rather than@Redirects: they occupy the return instruction instead of thegetCapabilitycall site, so they are orthogonal to — and coexist with — third-party mods that redirect the same calls (e.g. taczaddon). Inventory hits short-circuit before any crate scan. - Fire-session tracking is dual-side (client prediction + server authoritative) via
GunFireEvent.
Known limitations
- Guns whose Lua script overrides
handle_shoot_heatskip cooling/air-cooling scaling (most guns use the default path). - The reload-animation ammo check (
hasAmmoToConsume) still looks at the bare inventory only — affects animation timing, not actual supply. - COMMON config is not synced between client and server; keep both sides' files consistent on multiplayer servers.
- TACZ's engine fires at most one shot per tick, so all fire rates are capped at 1200 RPM — anything above is clamped to 1200.
Build
./gradlew build
Requires Java 17 and the three dependency jars in libs/ (TACZ, Sophisticated Backpacks, Sophisticated Core) — included in the repo.