Skip to content
blockninja124 edited this page Jul 28, 2026 · 1 revision

Generic gas node peripheral

Available on most blocks that have an internal inventory of gas (some exceptions apply, which are gas-storing blocks with their own custom peripheral)


getGasDetails(gasName: string) -> table

Returns a table representing the gas properties, in the following format:

{
    name = <string>
    density = <number>
    viscosity = <number>
    specificHeatCapacity = <number>
    thermalConductivity = <number>
    sutherlandConstant = <number>
    adiabaticIndex = <number>
}

Throws if the gasName (resource location) is not found in the gas registry


getGasMass() -> table<string, number>

Returns a table of each gas name to its mass in the node. Will contain every gas name, even if the node does not contain that gas.


getHeatEnergy() -> number

Returns the total heat energy in the node, in Joules


getPressure() -> number

Returns the pressure of the node, in Pascals


getTemperature() -> number

Returns the temperature of the node, in Kelvin


pushGas(toName: string, gasName: string, amount: number | nil)

Push the gas of type gasName from this node to the node with the peripheral name toName. If amount is not specified, it will move the entire amount of gasName in the node.

Throws if:

  • toName is not found as a peripheral
  • toName is not a gas node peripheral
  • gasName is not found in the gas registry
  • amount is <=0
  • amount is larger than the amount of gasName in the node
  • cheatKelvinPeripheral is not enabled in the server config (disabled by default)

pullGas(fromName: string, gasName: string, amount: number | nil)

The same as pushGas, documented above, except the gas is being moved from the fromName into this node.


pushTemperature(toName: string, amount: number | nil)

Push amount of Kelvin from this node to the node peripheral named toName. If amount is not specific, it will transfer all heat from this node into toName.

Throws if:

  • toName is not found as a peripheral
  • toName is not a gas node peripheral
  • amount is <=0
  • amount is larger than the temperature in the node
  • cheatKelvinPeripheral is not enabled in the server config (disabled by default)

pullTemperature(fromName: string, amount: number | nil)

The same as pushTemperature, documented above, except the temperature is being moved from the fromName into this node.

Clone this wiki locally