immersion_in_traffic_context-1.21.1.4.1.0-neoforge-1.21.1.jar
Curse Maven Snippet
What's new
Changelog — ImmersionInTrafficContext
All notable changes to this project are documented here. Format is based on Keep a Changelog.
[1.21.1.4.1.0] — 2026-11-27
Added
ETC item (etc) — a right-clickable card. Right-clicking the air opens an exchange GUI with an always-visible balance (¥); right-clicking a barrier runs the toll state machine.
ETC exchange GUI — converts items to balance at fixed rates: Emerald ¥60, Diamond ¥55, Netherite Ingot ¥230, Coal ¥0.5, Iron Ingot ¥22, Gold Ingot ¥50, Copper Ingot ¥17, any log ¥0.1. Each price is described in the GUI.
ETC toll state machine — x=0 (entry): right-clicking a barrier records it, raises the arm free of charge and switches to x=1. x=1 (exit): right-clicking a different barrier charges a distance fee (¥0.02/block by default) plus a time fee (¥0.001/second, waived below ¥1), then switches back to x=0.
Wrench configuration GUI — admins holding an existing wrench can right-click a barrier to set the open duration (1–3600 s) and the distance price.
Hand-written OBJ models and materials — a custom 3.5-block barrier arm and post, with a standalone OBJ model registered for the arm and a smooth 0°→90° rotation animation on raise/lower.
Multi-block physical collision — a new invisible toll_barrier_arm segment block is placed along the arm's path. It has no outline shape (so it never intercepts clicks) but provides a thin collision shape, so the entire arm now stops players and vehicles, not just the post. Orphaned segments automatically lose their collision when the owning post is gone or open.
Configurable arm length — the wrench GUI now includes an arm-length field (1.0–7.0 blocks, default 3.5). The value is saved in NBT, rebuilds the collision segments, stretches the OBJ model and updates the interaction shape to match.
Changed
Toll Barrier block (toll_barrier, "Toll Barrier" / "收费站升降杆") — rebuilt with the OBJ post model, the animated arm, and ETC/wrench interaction handling.
Collision vs. interaction split — the post keeps a long outline shape for ray-traced right-clicks on the far end of the arm, while physical collision now comes only from the post cell and the new segment blocks.
Segment count and placement — segments are generated from the configured length (ceil(11.5/16 + length), up to 8) and only fill replaceable cells, so existing solid blocks are never destroyed.
Fixed
Hitbox and interaction range of the barrier — the outline shape had been clipped to the source block, making the far end of the arm impossible to right-click. It now returns the full arm in every facing direction (verified with VoxelShape.clip).
Free vs. paid trip logic — entry is free; exit charges distance and time with the entry-time price preserved for in-progress trips; insufficient balance is reported without deducting.
MCreator project index — after MCreator overwrote .mcreator on save, the TollBarrierArm element record and its language keys were restored, and the block registration was moved into MCreator's protected user-code region so future regenerations cannot remove it.
Localization
Added en_us and zh_cn entries for the new block, GUI labels, hints and save message; both language files and the .mcreator language map are kept in sync (207 keys each).
This mod has no additional files

