This class was added by a mod with mod-id mekanism. So you need to have this mod installed if you want to use this feature.

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import mods.mekanism.content.builder.GasBuilder;

Extending ChemicalBuilder

Link to extending-chemicalbuilder

GasBuilder extends ChemicalBuilder. That means all methods available in ChemicalBuilder are also available in GasBuilder

Name: builder

Creates a builder for registering a custom Gas.

Returns: A builder for creating a custom Gas.
Return Type: GasBuilder

ZenScript
Copy
GasBuilder.builder(textureLocation as MCResourceLocation) as GasBuilder
ParameterTypeDescriptionOptionalDefaultValue
Parameter
textureLocation
Type
MCResourceLocation
Description
If present the MCResourceLocation representing the texture this Gas will use, otherwise defaults to our default Gas
texture.
Optional
true
DefaultValue

Name: build

Create a chemical from this builder with the given name.

Return Type: void

ZenScript
Copy
GasBuilder.build(name as string) as void
ParameterTypeDescription
Parameter
name
Type
string
Description
Registry name for the chemical.

Name: color

Sets the tint to apply to this chemical when rendering.

Return Type: CRT_BUILDER

ZenScript
Copy
GasBuilder.color(color as int) 
ParameterTypeDescription
Parameter
color
Type
int
Description
Color in RRGGBB format

Link to colorRepresentation

Name: colorRepresentation

Sets the color representation to apply to this chemical when used for things like durability bars. Mostly for use in combination with custom textures that are not tinted.

Return Type: CRT_BUILDER

ZenScript
Copy
GasBuilder.colorRepresentation(color as int) 
ParameterTypeDescription
Parameter
color
Type
int
Description
Color in RRGGBB format

Name: hidden

Marks that this chemical will be hidden in JEI, and not included in the preset of filled chemical tanks.

Return Type: CRT_BUILDER

ZenScript
Copy
// GasBuilder.hidden() 

myGasBuilder.hidden();

Name: with

Adds an attribute to the set of attributes this chemical has.

Return Type: CRT_BUILDER

ZenScript
Copy
GasBuilder.with(attribute as ATTRIBUTE) 
ParameterTypeDescription
Parameter
attribute
Type
ATTRIBUTE
Description
Attribute to add.