Pack Making JSON Animation Variables - DonBruce64/MinecraftTransportSimulator GitHub Wiki

Below is a listing of all animation variables currently supported in MTS. Note that variables may be prefixed with a ! symbol to get the inverted state of them. For example !horn would be 1 if the horn is off, and 0 if the horn is on. And !speed would be 1 if the speed is 0, and 0 if the speed is anything except 0.

Properties that are marked with * can be modified using variableModifiers for more advanced functionality.

Global Variables

These variables work on anything you create.

Binary Variables

Variable Value Note
text_X_present At least 1 character of text is in slot number X. Will return 0 if specified on something that doesn't have text or if the slot index is higher than the number of text slots.
inliquid Entity is in liquid
player_interacting At least one player is interacting with this entity via a GUI.
player_crafteditem A player has just crafted an item in the GUI for this entity.
player_cursor_hovered The player has their cursor over this entity.
random_flip Randomly 0 or 1. Updates every tick and is separate between servers and clients, so DO NOT use this for parts animations of any kind. Use only for client-rendering or server-specific operations like initial spawning properties.
damage_totaled Entity is completely out of health
collision_X_totaled Collision group number X is out of health
config_simplethrottle simpleThrottle is on Read-only variable that reflects the setting in the MTS config menu. ONLY check for this on clients: servers don't know MTS config menu settings and will crash if you use this.
config_innerwindows innerWindows is on Read-only variable that reflects the setting in the MTS config menu. ONLY check for this on clients: servers don't know MTS config menu settings and will crash if you use this.
radar_detected A radar is tracking this vehicle.
radar_X_detected Radar X is tracking this vehicle. This is for only the Xth radar tracking. If X=2, and you have 1 radar tracking, it will be 0. If you have 2+ radars tracking, it will be 1.
blockname_NAME The specific block name is at this position.
blockmaterial_NAME The specific block material is below. Valid materials are: dirt glass grass gravel ice lava leaves metal sand snow stone water wood wool If the block isn't any of these materials, then it will be normal.
terrain_blockname_NAME The specific block is below.
terrain_blockmaterial_NAME The specific block material is below.
XXX_YYY_ZZZ_cycle This variable cycles between 0 and 1 at the interval specified. XXX, YYY, ZZZ are numbers. XXX is how many ticks the variable should be off from the start of the cycle. YYY is how many ticks the variable should be on in the cycle after the XXX time. ZZZ is how long the variable should be off before repeating. As an example, a variable named 5_10_40_cycle would result in a variable that would be off for 5 ticks, then on for 10 ticks, then off for 40 ticks, for a total of a 55-tick cycle time.
radio_active Radio playing audio
radio_volume The volume of the radio From 0 to 10. No, it does not go to 11.
radio_preset The currently-selected preset -1 if no preset is selected.

Analog Variables

Variable Value Note
light_sunlight Sunlight level / 15 Doesn't include block lights.
light_total Total light level / 15 Sum of block and sun lights.
rain_strength 0(clear), 1(rain), 2(thunder) Does not take into account if rain is at the position. Ex. will return 1 in a cave when raining outside.
rain_sin Sin function for rain_strength Cycles between 0 and 1 in a sine wave. Value means frequency.
rain_cos Cos function for rain_strength Cycles between 0 and 1 in a cosine wave. Value means frequency.
tick Number of ticks that have elapsed in the world Useful for things that need to spin or move at a constant rate.
tick_sin sin(tick°)
tick_cos cos(tick°)
time Time of day Same as /time set.
terrain_distance Distance to the ground directly below this entity Slab height is considered.
posX The precise X coordinate on this entity
posY The precise Y coordinate on this entity
posZ The precise Z coordinate on this entity
damage Damage accumulated on this entity
damage_percent The percentage of damage accumulated on this entity with respect to its health.
collision_X_damage Damage accumulated on the Xth collision group of this entity
distance_client The distance from this thing to the client player. ONLY use this on clients: servers don't know anything about client players and will crash if you use this.
orientation_client_x The angle from this point to the client player, in the x-axis Recommended order to apply angles is y, x, z
orientation_client_y The angle from this point to the client player, in the y-axis Recommended order to apply angles is y, x, z
orientation_client_z The angle from this point to the client player, in the z-axis Recommended order to apply angles is y, x, z
random A random decimal number picked between 0.0 and 1.0 Updates every tick and is separate between serverside and clientside, so AVOID using this for parts animations of any kind.
radar_X_distance The distance between the entity this is on, and the Xth radar tracking this vehicle.
radar_X_direction The angle between the entity this is on, and the Xth radar tracking this vehicle.
radar_aircraft_X_distance The distance between the entity this is on, and the X nearest aircraft
radar_aircraft_X_direction The angle between the entity this is on, and the X nearest aircraft
radar_aircraft_X_speed The speed of the X nearest aircraft
radar_aircraft_X_altitude The altitude (Y-value) of the X nearest aircraft
radar_aircraft_X_angle The angle between the entity this is on, and the X nearest aircraft, vertically
radar_ground_X_distance The distance between the entity this is on, and the X nearest ground vehicle
radar_ground_X_direction The angle between the entity this is on, and the X nearest ground vehicle
radar_ground_X_speed The speed of the X nearest ground vehicle
radar_ground_X_altitude The altitude (Y-value) of the X nearest ground vehicle
radar_ground_X_angle The angle between the entity this is on, and the X nearest ground vehicle, vertically

Vehicle Variables

These variables are available only on vehicles.

Binary Variables

Variable Value Note
navigation_light* Light is on
strobe_light* Light is on
taxi_light* Light is on
landing_light* Light is on
running_light* Light is on
headlight* Light is on
left_turn_signal* Signal is on
right_turn_signal* Signal is on
autopilot_present* The vehicle has an autopilot or cruise control option
autopilot_active* Autopilot or cruise control is active
door Parking brake off AND vehicle unlocked
engines_on At least one engine is switched on. Does not mean the engine is running, just that it is switched on.
engines_starting At least one engine has a starter engaged.
engines_running Any engine running
flaps_moving Flaps moving to setpoint
flaps_increasing Flaps less than and moving to setpoint
flaps_decreasing Flaps greater than and moving to setpoint
fueling Vehicle being fueled
gear_present Vehicle has landing gear as defined by gearSequenceDuration being non-zero
gear_setpoint Gear is commanded to be up Gear does not mean gear is actually up, just that it is requested to be that way.
gear_moving Landing gear moving Duration controlled by gearSequenceDuration.
horn Horn is on
locked Vehicle locked
beacon_connected This vehicle is connected to a valid beacon
missile_incoming Any missile tracking your vehicle Useful for making a missile warning system
p_brake Parking brake applied
reverser Reverse thrust activated
reverser_present Either a propeller can be reversed, the vehicle has a jet engine, or it is a blimp.

Analog Variables

Variable Value Note
acceleration Change in velocity of the vehicle
aileron Current aileron angle, between ±25 degrees Positive when rolling clockwise.
altitude How high this vehicle is, in blocks, above configured sea level. Can be negative Default sea lvl is 63. Altitude can be negative if below sea level.
autopilot* Current auto-pilot (or cruise control) setting for the vehicle For aircraft, this is the altitude set for holding. For all other vehicles, this is the speed set for cruise control.
ballastControl How much to rise or fall if we're a blimp-like vehicle with a ballast Defaults to input_elevator unless overrode by a VM
beacon_bearing_setpoint The bearing of the selected beacon, in degrees
beacon_bearing_delta The delta between the aircraft’s bearing, and the beacon’s bearing, in degrees
beacon_direction The angle to the selected beacon, in degrees
beacon_distance The distance to the selected beacon, in blocks
beacon_glideslope_setpoint The glideslope of the selected beacon
beacon_glideslope_actual The glideslope of the vehicle, to the selected beacon
beacon_glideslope_delta The difference between the selected beacon glideslope, and the vehicle’s actual glideslope
brake* Current brake / Full brake
electric_power Current level of electric power in the vehicle Vehicles start with 12V, but can go up to 14V when running, or 0V when dead.
electric_usage Current Electric usage, in V per second
elevator Current elevator angle, between ±25 degrees Positive when pitching up.
flaps_actual* Actual flap angle, in degrees
flaps_setpoint* Current command to the flaps, in degrees
fuel Fuel currently in the vehicle / Total fuel capacity
heading Yaw with a different format, between 1 and 360 degrees Increases in the clockwise direction, like real-world headings. By default, 360 represents South to be in line with the Minecraft “0” heading you see in the F3 screen. To change to the real-world North = 360 system, set north360 to “true” in the config. Use this for text objects representing vehicle heading.
input_aileron* Current aileron input, between ±25 degrees Positive when rolling clockwise.
input_elevator* Current rudder input, between ±25 degrees Positive when pitching up.
input_rudder* Current rudder input, between ±45 degrees Positive when turning right.
lift_reserve How much lift this vehicle has, unit-less Stall occurrs at about -17 when no flaps are deployed, 0 indicates that the plane has no lift at all. In level flight this value will be positive as the plane is generating lift.
mass The mass of the vehicle. This includes all parts, cargo, players, etc.
missile_#_direction Direction of an incoming missile relative to the direction the vehicle's heading, in degrees 0 is straight forward, and increases counter-clockwise. The number # is ordered by how close they are to the vehicle, increasing from close to far.
missile_#_distance Distance to an incoming missile, in blocks Using missile distance and direction together allow making a radar-style display that shows multiple missiles’ distance and direction relative to the vehicle
pitch Current pitch of the vehicle, in degrees 0 when level and increases when pitching down.
road_angle_front The angle between the vehicle, and the road it is on, for the front set of ground devices. 0 when not on a road.
road_angle_rear The angle between the vehicle, and the road it is on, for the rear set of ground devices. 0 when not on a road.
roll Current roll of the vehicle, in degrees 0 when level and increases when rolling clockwise.
rudder Current rudder angle, between ±45 degrees Positive when turning right.
slip The amount of slip the vehicle is experiencing Returns between -75 and 75 relative to which direction the vehicle is slipping from.
slip_degrees The angle of slip the vehicle is experiencing in degrees.
slip_understeer Similar to slip, but for understeer as the name implies. Returns between 0.0 and 1.0 depending on how far the rudder is turned.
speed Current forward axial speed of the vehicle, in blocks/second Will return a positive value, even if the vehicle is going backwards.
speed_scaled 'speed' divided by the speed factor This variable outputs speed that is scaled with the speed factor, useful for when you want consistency between different speed factors.
velocity Current speed of the vehicle, in blocks/second, regardless of direction Will always return a positive value
velocity_scaled 'velocity' divided by the speed factor This variable outputs speed that is scaled with the speed factor, useful for when you want consistency between different speed factors.
speed_factor Rather than outputting the current vehicle speed, this variable outputs the server's current speedfactor, useful for adjusting and rebalancing things via VMs, or whatever tickles your fancy! Generally between 0.35 to 1.0. This is technically the Global Speedfactor multiplied by the Pack Speed Factor.
throttle* Current throttle / Full throttle
trim_aileron Current aileron trim, between ±10 degrees Same direction as aileron.
trim_elevator Current elevator trim, between ±10 degrees Same direction as elevator.
trim_rudder Current rudder trim, between ±10 degrees Same direction as rudder.
turn_coordinator Current change in roll and yaw, unit-less
turn_indicator Current change in yaw
pitch_indicator Current change in pitch
vertical_speed Vertical speed of the vehicle Can be positive or negative depending on vehicle movement on the Y axis.
yaw Current yaw of the vehicle 0 when facing south, increases in the counter-clockwise direction.
thrust Current thrust output of all engines on vehicle. Best used for jet tuning. multiply by 0.4 to get kilonewtons.
vertical_acceleration Centrifugal acceleration around pitch axis. Unit is in M/Sec/Sec
vertical_acceleration_scaled Centrifugal acceleration around pitch axis, using scaled speed. Unit is in M/Sec/Sec
lateral_acceleration Centrifugal acceleration around yaw axis. Unit is in M/Sec/Sec
lateral_acceleration_scaled Centrifugal acceleration around yaw axis, using scaled speed Unit is in M/Sec/Sec
load_factor Current amount of Gs being enacted on the vehicle G as in 1x earth gravity
load_factor_scaled Current amount of Gs being enacted on the vehicle, using scaled speed G as in 1x earth gravity

Connection

Connection (hitch and hookup) variables follow a slightly different format, as the connection system allows for multiple connections per vehicle. The specific format is in the form of connection_groupIndex_connectionIndex_animation, or you can use connection_groupIndex_animation if you don't care about the specific connection in a group (in which only the first, or active one, will be chosen). This is parsed as follows:

  • connection - Required, but does nothing outside telling the animation system this is a connection animation.
  • groupIndex - The index of the connectionGroup to use in the list of connectionGroups defined in this vehicle's JSON.
  • connectionIndex - The index of the connection inside the connectionGroup to use.
  • animation - the animation requested for this connection, one of the following:
  • present – 1 if this entity has a connection group of this index present, 0 if not. This does not take into account connection indexes.
  • connected – 1 if the connection is connected, 0 if not.
  • pitch – The pitch angle between this vehicle and the connected vehicle, or 0 if nothing is connected.
  • roll – The roll angle between this vehicle and the connected vehicle, or 0 if nothing is connected.
  • yaw – The yaw angle between this vehicle and the connected vehicle, or 0 if nothing is connected.
  • In addition to the above, there is also a connection_requested variable. This variable represents the group index of the connection that will either be connected or disconnected (if it's already connected), next tick. Setting this variable to a non-zero number will cause the corresponding group's connections to be requested for connecting. After this operation, the variable will be set back to 0.

Part Variables

These variables are used on parts. The part to use them on must be specified as defined according to the Variable Hierarchy. Each variable is prefixed by the part type that uses it. Parts may also use any vehicle variable.

All Parts

Variable Value Note
part_present Specified part installed
part_ismirrored Part Mirrored A part is mirrored if it is mounted on the -X axis of a vehicle. If the part's slot on the parent has inverseMirroring set to true, this value will be inverted.
part_isonfront Part z position in JSON > 0
part_isspare Part is a Spare A part is spare when the part slot it is in has the isSpare definition.
part_onvehicle Part is on a vehicle This checks if the part is on a vehicle at all. So it will be 1 if the part is on a part, but that part is on a vehicle.
part_added_vehicle Part was just added to a vehicle by a player.
part_removed_vehicle Part was just removed from a vehicle by a player.
part_added_ground Part was just set onto the ground by a player.
part_removed_ground Part was just removed from the ground by a player.

Engines

Binary Variables

Variable Value Note
engine_clutch_upshift Engine shifting up It stays at this value for the duration of clutchTime as specified in the engine. If clutchTime is 0, then this variable will always return 0.
engine_clutch_downshift Engine shifting down It stays at this value for the duration of clutchTime as specified in the engine. If clutchTime is 0, then this variable will always return 0.
isAutomatic Engine shifts automatically If the engine has an automatic gearbox rather than a standard one, this variable will return 1. Otherwise this variable will always return 0.
engine_badshift Engine attempted to shift in the wrong direction and was unsuccessful.
engine_reversed Engine in reverse gear A more continent way to do animations for reversing things instead of clamped gear checks.
engine_magneto Magneto on For engines without their own magneto button, this will return 1 when the key is in the ON position.
engine_starter Starter on
engine_starter_hand Engine is crank-started by hand
engine_running Engine running and consuming fuel
engine_powered Engine spinning
engine_shift_up* Engine needs to try to up-shift this tick Is set to 0 after the tick (and possible up-shift operation) completes.
engine_shift_down* Engine needs to try to down-shift this tick Is set to 0 after the tick (and possible down-shift operation) completes.
engine_shift_neutral* Engine needs to try to shift into neutral this tick Is set to 0 after the tick.
engine_jumper_cable Engine connected to another engine via a jumper cable
engine_backfired Engine has backfired this tick Is set to 0 after the tick.
engine_piston_X_Y_Z_crank Divides the crankshaft rotation (engine_rotation) into Y sectors, and is '1' when the crank is in sector X. Z is the angle you want to offset this rotation. Example, engine_piston_2_4_10_crank will return 1 when the crank shaft is between 1/4 (90) and 2/4 (180) rotation, but offset by 10 degrees, so between the angles of 100 and 190.
engine_pistion_X_Y_Z_cam Like engine_piston_X_Y_Z_crank, just for the camshaft (1/2 crankshaft rotation). Example, engine_piston_2_4_10_cam will return 1 when the crank shaft is between 1/4/2 (45) and 2/4/2 (90) rotation, but offset by 10 degrees, so between the angles of 55 and 100.

Analog Variables

Variable Value Note
engine_rotation Current engine rotation, in degrees A constantly-increasing number that matches the engine RPM designed for things that need to rotate with the engine speed, such as fans and output shafts.
engine_sin sin(engine_rotation°) Useful for reciprocating parts that move back and forth. Can be suffexed with _# to shift the input to the trig function.
engine_cos cos(engine_rotation°) Useful for reciprocating parts that move back and forth. Can be suffexed with _# to shift the input to the trig function.
engine_driveshaft_rotation engine_rotation x gearing x axleRatio Useful for driveshafts and things that don't turn at the raw engine RPM.
engine_driveshaft_sin sin(engine_driveshaft_rotation°) Useful for reciprocating parts that move back and forth. Can be suffexed with _# to shift the input to the trig function.
engine_driveshaft_cos cos(engine_driveshaft_rotation°) Useful for reciprocating parts that move back and forth. Can be suffexed with _# to shift the input to the trig function.
engine_rpm Current RPM of the engine
maxRPM The max RPM of the engine
idleRPM The RPM at which this engine idles at
startRPM The RPM at which this engine starts up when its magnetos are on
stallRPM The RPM at which this engine is running too slow and stalls out
revlimitRPM The max rev limiter RPM of the engine Reports -1 if engine does not have a rev limiter.
engine_rpm_percent engine_rpm / engine_rpm_max This value should be between 0 and 1.
engine_rpm_percent_safe engine_rpm / engine_rpm_safe Allows showing unsafe RPM percentages as those greater than 100%. This value should be roughly between 0 and 1.1.
engine_rpm_percent_revlimit engine_rpm / engine_rpm_revlimit If this engine does not have a rev limiter, it will report the value of engine_rpm_percent_safe instead.
fuelConsumption The amount of fuel this engine consumes, in millibuckets/tick
engine_fuel_flow The fuel flow to the engine, in buckets/minute
engine_fuel_remaining The percentage of rocket fuel left in this rocket. 0 for non-rocket engines.
engine_temp The engine temperature, in Celsius 30C /86F is the cold start temp, under which revving an engine fast will cause damage. 115.5C/240F is the overheat temp #1 at which point engine damage starts to occur and smoke starts forming. 121.1C/250F is the point at which larger smoke appears and engine damage becomes more rapid. At 132C/270F engines experiences critical failure and blow up.
engine_temp_ambient The ambient temperature of the biome this engine currently resides in
engine_pressure The current pressure, in PSI For combustion engines, this is the oil pressure, with values before 40PSI causing damage. For steam engines, this is the boiler pressure.
engine_gear The current gear of the engine Valid only for engines that have gears (not aircraft). Will be 0 if the vehicle is in neutral, and -1 if the vehicle is in reverse.
gearRatio The current gear ratio of the engine Valid only for engines that have gears (not aircraft).
engine_gearshift Is always 0 degrees when in neutral gear. Is -5 degrees when in reverse for manuals, -15 for automatics. For automatics, is +15 degrees when in forwards gear. For manuals, increments 5 degrees for every gear. e.g., gear 4 is 20 degrees.
engine_gearshift_hvertical Ranges from -15 to 15 depending on the selected gear and number of gears in the transmission. Is 0 degrees when in neutral gear. Used to rotate the gearshift forwards and backwards for H-pattern shifters.
engine_gearshift_hhorizontal If an engine with only two gears (R, N, 1) is present, this will always be 0. Otherwise, 5 degrees will be put between all columns, except when there's only 3 or 4 gears, in which case it will be 10. So for a 5-speed this will range from -5 to 5, with a stop at 0 for gears 3 and 4. Is 0 degrees when in neutral gear. Used to rotate the gearshift left and right for H-pattern shifters.
engine_hours The number of hours accumulated on the engine

Guns

Binary Variables

Variable Value Note
gun_inhand Gun is a hand-held variant and is currently in the hands of a user Useful for activating cameras that should only be available in hand-held mode.
gun_controller_firstperson The controller of the gun is the current client player, and they are in first-person. This should never be used on something that can check for this variable on the server, as it checks for the client player.
gun_inhand_equipped Like gun_inhand, but this variable delays tick from the time the gun is put in the hand, and turns off a tick before the gun is removed. Designed for sounds/particles that need to play during gun equipping/holstering.
gun_inhand_sneaking Like gun_inhand, but only active if the player holding the gun is sneaking.
gun_inhand_aiming Like gun_inhand, but only active if the player holding the gun is aiming the gun.
gun_active Gun is active (selected) Guns without controllers cannot be active as there's nobody controlling them.
gun_firing Gun is trying to fire bullets A gun will still be marked as firing even if there are no bullets to fire.
gun_lockedon Gun is currently locked-on to any entity Only valid when this gun contains a bullet with lock-on functionality.
gun_pitching Gun changing pitch
gun_yawing Gun changing yaw
gun_fired Gun fired a bullet in this tick Useful for triggering sounds when a bullet is fired.
gun_muzzleflash On when gun_fired is true, but only for 1/2 a tick. Used mainly for rendering muzzle flashes since this only works with partial tick spawned particles.
gun_cooldown Gun cooling down
gun_windup_complete Gun’s windup is complete Does not mean the gun will fire, such as if it’s out of bullets.
gun_reload Gun has just started reloading
gun_reload_windup Gun is performing the reload windup.
gun_reload_main Gun is performing the main reload. If the gun is reloading multiple bullets in clipless form, this variable will be 0 for 1 tick while the gun switches from reloading one bullet to the next. Useful for triggering the same animation for every bullet.
gun_reload_winddown Gun is performing the reload winddown.
gun_ammo_X_loaded The ammo number X is loaded into this gun. This is a digital variable linked to gun_ammo_count, but usable animation blocks for movement since it's 0/1 state.
gun_bullet_present Gun has fired a bullet and it is present in the world This tracks only the most recent bullet. So if you fire a second bullet after the first, but that second bullet de-spawns before the first, this variable will be 0, despite the first bullet still existing

Analog Variables

Variable Value Note
gun_pitch Current gun pitch, in degrees
gun_yaw Current gun yaw, in degrees
gun_windup_time Current gun windup time value Goes from 0 to the gun’s set windup time as the gun winds up.
gun_windup_rotation Rotational value for windup Incremented by the current gun_windup_time every tick. For example, a gun with a windupTime of 20 will have this variable increment by 20 each tick when fully wound-up. Useful for animating the rotating barrel of wound-up guns.
gun_ammo_count Current gun ammo count Does NOT take ammo stored in crates in the vehicle that this gun could pull from into account. This is only the gun's internal ammo count.
gun_ammo_count_reloading How much ammo is being loaded into the gun Does NOT equal to gun_ammo_count, and is 0 when the gun is not reloading.
gun_ammo_percent gun_ammo_count / Total ammo capacity
gun_lockedon_x The x coordinate of where the gun is currently locked-on to.
gun_lockedon_y The y coordinate of where the gun is currently locked-on to.
gun_lockedon_z The z coordinate of where the gun is currently locked-on to.
gun_lockedon_direction The horizontal angle of the locked on target, in degrees, relative to where the gun is pointed
gun_lockedon_angle The vertical angle of the locked on target, in degrees, relative to where the gun is pointed
gun_lockedon_leadpoint_direction The horizontal angle of the point to aim to to hit the locked on target, in degrees, relative to where the gun is pointed.
gun_lockedon_leadpoint_angle The vertical angle of the point to aim to to hit the locked on target, in degrees, relative to where the gun is pointed.
gun_lockedon_leadangle_x The angle, in degrees, in the global xz plane you need to lead to hit the target.
gun_lockedon_leadangle_y The angle, in degrees, in the global y-axis you need to lead to hit the target.
gun_lockedon_distance The straight-line distance between the gun and it's locked target.
gun_bullet_x The x-position of the bullet just fired, in the gun's coordinate system.
gun_active_muzzlegroup Current active muzzle group on this gun Incremented as muzzle groups are cycled though. Will just stay at 1 for guns with only one muzzle group.
gun_bullet_x The x-position of the bullet just fired, in the gun's coordinate system.
gun_bullet_y The y-position of the bullet just fired, in the gun's coordinate system.
gun_bullet_z The z-position of the bullet just fired, in the gun's coordinate system.
gun_bullet_yaw The yaw difference between the gun's yaw and the bullet's yaw.
gun_bullet_pitch The pitch difference between the gun's pitch and the bullet's pitch.

Text Variables

Variable Value Note
gun_lockedon_name The name of the entity the gun is currently locked-on to, or a blank string if the gun isn't locked-on to any entity.

Interactables

Variable Value Note
interactable_count_stacks The amount of stacks in this interactable's inventory If the interactable does not have an inventory, or is a tank, then 0 is returned.
interactable_count_items The amount of stacks items in this interactable's inventory If the interactable does not have an inventory, or is a tank, then 0 is returned.
interactable_percent Slots occupied / Total inventory slots OR Fluid count / Tank capacity Does not check how full the stacks are in the inventory, only if they are present. Therefore, a value of 1 is returned for an inventory that contains 7 stacks of dirt with only one dirt per stack.
interactable_capacity The inventory units for this inventory
interactable_fuel How long this interactable has left to keep burning, in ticks Only for furnaces and brewers
interactable_remaining How long this interactable's current item has until smelted, in ticks Only for furnaces and brewers
interactable_fluid_x True if the fluid x is in this interactable's tank This is the ID of the fluid itself, not the name, nor the fuel type for the engine

Propellers

Variable Value Note
propeller_pitch_deg Current propeller pitch, in degrees
propeller_pitch_in Current propeller pitch, in inches
propeller_pitch_percent Current propeller pitch / Max pitch Will return a negative value for negative pitch if reverse thrust is activated.
propeller_rotation Current rotation of the propeller, in degrees This takes the engine gearing into account so it may not match the engine RPM.
propeller_rpm Current RPM of the propeller This takes the engine gearing into account so it may not match the engine RPM.

Ground Devices

Variable Value Note
ground_onground Ground device on the ground
ground_isflat Ground device is flat
ground_striking Ground device has just struck a block More formally, this happens when the ground device changes RPM suddenly, like when an airplane lands and the wheels start turning. Only valid for ground devices flagged as isWheel.
ground_skidding Ground device is turning, but slips on the block below it Used for skidding animations for burnouts.
ground_slipping Ground device is trying to steer the vehicle, but slips on the block below it Used for slipping animations on turns.
ground_blockname_XXXXX Ground device is on the specified block. Like blockname_XXXXX, but for the block the ground device is on. See blockname for details.
ground_blockmaterial_XXXXX Ground device is on the specified material. Like blockmaterial_XXXXX, but for the block the ground device is on. See blockmaterial for details.
ground_rotation Current rotation, in degrees 0 for non-wheels, negative for mirrored wheels.
ground_rotation_normalized Current rotation, in degrees Limited between 0 and 359, or 0 and -359 for mirrored wheels.
ground_distance Current distance between this wheel and the ground. Like terrain_distance, but this uses the ground device's local center rather than the vehicle it is on.

Seats

Variable Value Note
seat_occupied Seat has a rider
seat_occupied_client Seat is being ridden by the current client player May NOT be used on servers, so don't put this in part-movement animations. Rather, this may only go in animations inside [[rendering
seat_rider_yaw Current yaw of the rider of this seat relative to the seat itself, in degrees Allows things like cameras that aren’t tied to a gun, or moving spotlights.
seat_rider_pitch Current pitch of the rider of this seat relative to the seat itself, in degrees Allows things like cameras that aren’t tied to a gun, or moving spotlights.

Effectors

Variable Value Note
effector_active Effector active
effector_operated Effector did a thing this tick. Can be removing snow, planting seeds, plowing dirt, etc.
effector_drill_broken How many blocks this effector has broken Only works on drills.
effector_drill_max How many blocks this effector can break Only works on drills.
effector_drill_percentage effector_drill_broken / effector_drill_max Only works on drills.

Block Variables

These variables are used on blocks like decor and poles. Each variable is specific to a specific block type, as listed below.

All Blocks

Variable Value Note
redstone_active Block receiving redstone signal
redstone_level Redstone signal strength being provided to this block

Decors

Variable Value Note
clicked Decor is clicked this tick
activated Decor is activated Think Vanilla levers.
fuelpump_active Pump connected to a vehicle
fuelpump_free No prices set for pump
fuelpump_stored Amount of fuel currently stored in the fuel pump, in mb
fuelpump_dispensed Amount of fuel dispensed from the fuel pump, in mb
fuelpump_purchased Amount of fuel currently purchased from this pump Stays at this level until all the purchased fuel is used from the pump, resets to new purchases. Much like gas pumps in real-life where they show the last transaction until a new one is started.
fuelpump_fluid The name of the fluid currently stored in the fuel pump, or a blank string if no fluid is in the pump.
fuelpump_fluid_x True if the fluid x is in this fuel pump This is the ID of the fluid itself, not the name, nor the fuel type for the engine
charger_active Charger connected to a vehicle
charger_free No prices set for charger
charger_dispensed Amount of energy dispensed from the charger, in mb (don't ask)
charger_purchased Amount of energy currently purchased from this charger Stays at this level until all the purchased energy is transferred from the charger, resets to new purchases. Much like gas pumps in real-life where they show the last transaction until a new one is started.
charger_vehicle_percentage Percentage full the battery of the connected vehicle is, up to 1 when completely full. Is 0 when no vehicle is connected.
tank_loading_active Loading fluid into a tank
tank_unloading_active Unloading fluids from a tank
tank_buffer_active Liquid in the tank buffer This is likely to be 0 if using as an unloader as liquid will be removed from the buffer immediately once unloaded. If it's not, then the unloader isn't connected right. For loaders, the buffer will be full if not loading. If the buffer is empty on a loader, it means no liquid is going to it from connected sources. So this works as a good status indicator for loader/unloader connections. Hint hint...

Poles

Variable Value Note
linked Signal is linked with a signal controller Only valid for traffic signals.
slab_present_up A top-slab block is above this block
slab_present_down A bottom-slab block is below this block
neighbor_present_<AXIS> Another pole block is present at this axis relative to the block Axis can be any of: up, down, north, south, east, west, northeast, northwest, southeast, southwest.
matching_present_<AXIS> The same type of pole block is present at this axis relative to the block
solid_present_<AXIS> A block with a solid face is present at this axis relative to the block Note that the entire block may not be solid; this is only for the face. Sideways stairs are one such block that may return 1 here sometimes depending on orientation.

Bullet Variables

These variables are used on bullets. Mainly for spawning hit particles.

Variable Value Note
bullet_hit Bullet hits something This can be a block, entity, vehicle, etc.
bullet_hit_block Bullet hits a block At this time the bullet will be considered to be at the location of the block, which puts it at the very bottom of it due to how block coordinates are structured. Therefore, any particles spawned should have at LEAST a y-offset of 1, and likely more.
bullet_hit_entity Bullet hits an entity This does not include vehicles, only mobs and players and other "soft" targets.
bullet_hit_vehicle Bullet hits a vehicle or a part on a vehicle
bullet_hit_armor Bullet hits an armor box on a vehicle
bullet_hit_burst Bullet has timed out and is performing its air-burst logic. This is not the standard age timeout, rather, this is the JSON-defined parameter.
bullet_hit_penetrated Bullet has hit armor and completely penetrated. Does not detect how much armor, just if it made it through.
bullet_burntime The amount of burn time left on the bullet
⚠️ **GitHub.com Fallback** ⚠️