Mekanism - roidrole/Roids-Tweaker GitHub Wiki
Allows creation of custom gasses and infusion types
Infusion Types
You can add infusion types and items adding them
| Method | Parameters | Description |
|---|---|---|
| AddType | name as string, @Optional icon as string | Creates an infusion type. Default icon is defaultDomain+":blocks/infuse/" + name.toLowerCase(). Should be called in #loader preinit or #loader contenttweaker. |
| AddTypeObject | item as IIngredient, name as string, quantiy as int | Will loop through the items matching the ingredient, adding an entry for each one with the specified quantity. |
If you want to localize, the translationKey is the provided name.
Custom Gasses
Two classes are to be used :
Gas Factory
Allows to create a builder for a gas allowing more configuration
Import:
import mods.mekatweaker.GasFactory;
This class has three method, which both return a GasRepresentation, acting like a builder from Contenttweaker.
All three methods return a GasRepresentation ready for building, GasRepresentation methods are for extra customization
| Method | Description |
|---|---|
| createGas(fluid as ILiquidStack) | Returns a new gasRepresentation based on this fluid |
| createGas(unlocalizedName as string, icon as string) | Returns a new gasRepresentation with the specified unlocalizedName and icon |
| createGas(unlocalizedName as string, color as int) | Returns a new gasRepresentation with the specified unlocalizedName, a default icon tinted by this color |
GasRepresentation
Import :
import mods.mekatweaker.Gas;
This class is used to hold the Gas you are creating before registering it. It has a number of properties you can edit before building it (they all have getters and setters)
| Property | Description |
|---|---|
| TranslationKey | the gasName in NBT and determines the string used for translation (gas.[TranslationKey]) |
| color | Color used for tinting. Defaults to 0xFFFFFF |
| needFluid | Whether we should create a fluid for this gas, if it doesn't have one already |
| needBucket | Whether the fluid created can be put in a bucket |
| icon | Texture of the gas. You can use setIcon(domain as String, path as String) or setIcon(path as string) to use the default domain |
| iconFlow | Idem, but for the fluid created when flowing |
Once you are done editing (and if you are not editing), don't forget to GasObject.register();