Mekanism
Mekanism CraftTweaker support has been integrated directly into Mekanism now (link)
Mekanism adds bracket-handler support to define gas — a special material state differing from forge liquids
Noting that <gas:water>
is different from <liquid:water>
As of Mekanism 9.7.0 it is now possible to view all registered gases (including those from other mods) via the command /ct gases
It is also possible as of Mekanism 9.7.1 to get a gas stack/bracket handler by string. Use mods.mekanism.MekanismHelper.getGas(string);
Example
ZenGetters
Like LiquidStacks, IGasStacks also support some special ZenGetters.
You call the ZenGetters using gas.Getter
(E.g. <gas:water>.name
)
ZenGetter | Description | Return Type |
---|---|---|
ZenGetter definition | Description Returns the gas’ definition | Return Type IGasDefinition |
ZenGetter NAME | Description Returns the gas’ name | Return Type string |
ZenGetter displayName | Description Returns the gas’ displayName | Return Type string |
ZenGetter amount | Description Returns the gas’ amount in millibuckets | Return Type int |
Setting the Object’s Amount
You can set the Object’s amount (gas volume in Millibuckets) in two ways, which both do exactly the same:
IGasDefinition
An IGasDefinition object contains information on a gas.
You can get such an object using gasStack.definition
(check the table above)
ZenGetter | Description | Return Type |
---|---|---|
ZenGetter NAME | Description Returns the referred gas’ name | Return Type string |
ZenGetter displayName | Description Returns the referred gas’ display name | Return Type string |
You can multiply a gasDefinition to return a new IGasStack with the given amount in millibuckets: