behavior.yml file defines how the car interacts with the world: whether it breaks on impact, if it can ram mobs, and how the repair system works.
Durability and Regeneration (health)
A car can have a total health pool and an automatic recovery system.
- max: Maximum car HP (e.g.,
1000.0). - engine-disabled-health-percent: Health percentage (e.g.,
0.10or 10%) at which the engine stalls and won’t start until repaired. - regen: If enabled, the car will slowly repair itself if it hasn’t been hit for
delay-ticks.
Per-Part Damage System (damage)
CoolCars supports an advanced damage system. You can break the front, rear, or wheels individually.
Damage Effects:
- slowdown-start-percent: At what wheel health % the car starts to drive slower.
- smoke-threshold-percent: At what body health % black smoke starts coming from under the hood.
Landing Damage (landing)
Configuring how much the car suffers from jumping from heights.
- min-impact-speed: Minimum falling speed at which damage starts to count.
- height-ranges: You can set fixed damage for different heights. For example:
- Fall from 3-5 blocks: light wheel damage.
- Fall from 10+ blocks: critical engine damage.
Collisions (collision)
Defines the physical dimensions of the car for collisions with blocks.
- half-width / half-length: Half the width and length of the hitbox.
- wall-damping: How much speed is lost when hitting a wall.
- unstuck: Parameters for the “anti-stuck” system that pushes the car out if it gets inside blocks.
Combat Parameters (combat)
Ramming (ram)
Allows dealing damage to players or mobs upon impact.
- min-speed: Speed above which ramming starts to work.
- damage-scale: Damage multiplier based on speed.
- knockback: Force of the target’s knockback.
Vehicle Damage (vehicle-damage)
- melee: Whether the car can be hit with a sword/hand.
- projectiles: Damage from arrows, tridents, and other projectiles. You can enable
stick-arrowsso arrows stick into the car body!
Tip: For realism, enable
ignore-car-occupants so arrows hit the car instead of “passing through” it into the driver.