Part Seats Function - Fexcraft/FVTM GitHub Wiki
# Function Overview
Name: Seats Function
Function: adds seats to the vehicle
From FVTM: yes
The Seats Function allows you to add "seats" into a Vehicle.
Seats are entities spawned along the Vehicle Entity which allow
a player to sit in the vehicle, or eventually another Entity.
Attributes can be linked to be accessible to specific seats.
Example config (taken from FVP):
{
"__comment": "Part JSON file.",
"Function": {
"id": "fvtm:seats",
"seats":[
{ "x": 2, "y": -1, "z": -10, "name": "driver", "driver": true },
{ "x": 2, "y": -1, "z": 10, "name": "pass_front" },
{ "x": -16, "y": -1, "z": -10, "name": "pass_rear_left" },
{ "x": -16, "y": -1, "z": 10, "name": "pass_rear_right" }
]
}
}
Here an overview of the available fields:
id
- the id of the function, it isfvtm:seats
seats
- this is an JSON array with the seats listed (each a JSON object)x
- x coordinate of the seaty
- y coordinate of the seatz
- z coordinate of the seatdriver
- (boolean) optional, set totrue
if the passenger has to be regarded as driver/pilotname
- the unique name for this seat, Attributes may be linked that way to itmin_yaw
- optional, min passenger rotation yawmax_yaw
- optional, max passenger rotation yawmin_pitch
- optional, min passenger view rotation pitchmax_pitch
- optional, max passenger view rotation pitchsitting
- (boolean) optional, if the passenger should be displayed
as "sitting" or "standing" on this seat,false
by defaultrot_point
- optional, id of the SwivelPoint to assign this seat to, default:vehicleno_first_person
- optional, disable "first person view" while in a vehicleno_third_person
- optional, disable "third person view" while in a vehiclerelative
- optional, if this seat should offset it's position along the part's
installed position (e.g. on vehicles with varying chassis composition)filter
- optional, json array, list of ALLOWED entities to be passengers of this seat
when missing it accepts any entity, except if the seat is driver, then only players;
there are currently also 3 groups as shortcuts: "players", "animals", "hostile";
use a!
before the group or entity name to DISALLOW it from this seat;
example:"filter": ["players", "animals", "minecraft:spider", "!minecraft:pig"]
this example will allow into the seat players, animals, spiders (mob) - and disallow pigs