immersion_in_traffic_context-1.21.1.4.1.1-neoforge-1.21.1.jar
Curse Maven Snippet
What's new
Fixed
#000127: Multi-barrier animation triggered all barriers at once
- Issue: With multiple toll barriers placed, triggering any one of them with an ETC card made every barrier play the arm-raising animation.
- Root cause: The
animationProgressfield lived onTollBarrierRenderer, aBlockEntityRenderer. NeoForge creates a single renderer instance per block entity type, shared by all entities of that type. As a result, any barrier's state change drove the same shared progress value.
- Resolution: Moved the animation progress into a per-instance field on
TollBarrierBlockEntity(addedgetAnimationProgress()/setAnimationProgress(float)). The renderer now reads and writes the progress of the entity it is currently drawing. The field is client-side visual state only — it is not written to NBT and not synchronized.
- Also fixed: A freshly loaded barrier no longer snaps straight to its target angle; it now starts from the lowered position (0) and eases into place.
This mod has no additional files

