Vehicle Definition
Vehicle Definition
Definition of a vehicle type, including visual model, stats, fuel and combat.
Felder
| Feld | Typ | Standard | Beschreibung | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
visual | VehicleVisual | — | Visuel attaché au porteur du véhiculeVarianten:bettermodelbtcmobsdisplayvanilla
|
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
modelId | Var<String> | — | Identifiant du modèle BetterModel |
btcmobs (1)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
mobId | String | — | Identifiant du mob BTCMobs |
display (3)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
material | Material | MINECART | Item affiché comme véhicule |
scale | Float | 1.0 | Facteur d'échelle du modèle |
yOffset | Double | 0.0 | Décalage vertical par rapport au porteur, en blocs |
vanilla (1)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
entityType | EntityType | PIG | Type d'entité affiché comme véhicule |
movementVehicleMovementType?GROUNDGROUNDWATERAMPHIBIOUSAIRstatsVehicleStatsVehicleStats (4)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
maxSpeed | Var<Double> | 0.5 | Vitesse maximale tolérée, en blocs par tick. Au-delà, le serveur corrige la position |
maxHealth | Var<Double> | 100.0 | Points de vie du véhicule |
maxShield | Var<Double> | 50.0 | Bouclier absorbé avant les points de vie |
gravity | Var<Double> | 0.08 | Gravité appliquée au porteur, 0 pour un véhicule qui flotte |
fuelVehicleFuelSettingsVehicleFuelSettings (3)
| Feld | Typ | Standard | Beschreibung | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
maxFuel | Var<Double> | 100.0 | Capacité du réservoir | ||||||||||||||||
consumptionRate | Var<Double> | 0.1 | Carburant consommé par seconde de conduite | ||||||||||||||||
allowedFuels | List<FuelItem> | empty | —
|
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
item | Item | — | Item accepté comme carburant |
fuelAmount | Double | 20.0 | Carburant apporté par un plein |
amount | Int | 1 | Nombre d'items consommés par plein |
combatVehicleCombatSettingsVehicleCombatSettings (12)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
maxStamina | Var<Double> | 100.0 | Stamina maximale |
staminaRegenRate | Var<Double> | 5.0 | Stamina régénérée par seconde |
attackStaminaCost | Var<Double> | 5.0 | Stamina consommée par une attaque |
baseAttackDamage | Var<Double> | 4.0 | Dégâts d'une attaque de base |
attackCooldown | Var<Int> | 20 | Délai entre deux attaques (ticks) |
attackRange | Var<Int> | 4 | Portée d'une attaque (blocs) |
chargeBuildRate | Var<Double> | 20.0 | Charge accumulée par seconde en sneak |
chargeMeterMax | Var<Double> | 100.0 | Charge maximale |
chargeMinimumFraction | Var<Double> | 0.5 | Charge minimale requise pour déclencher (fraction du max) |
chargeDamageMultiplier | Var<Double> | 3.0 | Multiplicateur de dégâts d'une charge à pleine puissance |
chargeRadius | Var<Double> | 2.0 | Rayon d'impact d'une charge (blocs) |
collisionDamage | Var<Double> | 0.0 | Dégâts infligés par collision, multipliés par la vitesse (0 = désactivé) |
progressionVehicleProgressionVehicleProgression (4)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
maxLevel | Int | 10 | Niveau maximum atteignable |
baseXp | Double | 100.0 | XP requise pour passer du niveau 1 au niveau 2 |
xpGrowth | Double | 1.0 | Exposant de la courbe d'XP — 1.0 pour une progression linéaire |
statBonusPerLevel | Double | 0.05 | Bonus de stats par niveau au-dessus de 1 — 0.05 = +5% par niveau |
repairVehicleRepairSettingsVehicleRepairSettings (3)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
item | Item | — | Item consommé pour réparer |
amount | Var<Int> | 1 | Nombre d'items consommés par réparation |
healthPerRepair | Var<Double> | 20.0 | Points de vie rendus par réparation |
abilitiesList<Ref<VehicleAbilityEntry>>emptyHow to use it
One definition per vehicle type. Players own instances of it; the definition's id is what the saved data refers to, so do not delete or recreate a definition that players already own.
movementpicks the carrier and physics:GROUND(server moved, blocked in liquids),WATER,AMPHIBIOUS(boat, client simulated) andAIR(flying carrier).stats.gravityof 0 makes the carrier float.visualis one ofdisplay(an item, withscaleandyOffset),vanilla(an entity type, AI disabled),bettermodel(modelId, can depend on a fact or placeholder) andbtcmobs(mobId). The default is aMINECARTdisplay. A player skin chosen with Set Vehicle Skin replaces themodelIdof abettermodelvisual only.stats.maxSpeedis a validation ceiling in blocks per tick, not an acceleration: the server moves the vehicle back when it goes faster.maxHealthandmaxShieldset the damage pool; shield is spent first.fuel:maxFuelis the tank,consumptionRateis per second of movement,allowedFuelslists the items a refuel can consume (fuelAmountperamountitems).progression: with the defaults (baseXp100,xpGrowth1.0) level 1 needs 100 XP, level 2 needs 200, and so on; every level above 1 addsstatBonusPerLevel(5%) to speed, health and shield.combat:maxStaminaandstaminaRegenRatefeed the attack and abilities;collisionDamagemultiplies the vehicle speed to damage living entities it hits, 0 disables it.repairis the item and amount consumed by Repair Vehicle, and the health restored.abilitieslists the Vehicle Ability entries this vehicle can use.
Fields typed as variables can read a fact or placeholder of the driver.