Skip to content

MaterialFlags

ALongStringOfNumbers edited this page Jun 17, 2021 · 4 revisions

Material Flags

This page should provide information regarding what Material Flags are which are available and how to use them.

What is material flag?

This is concept which allows GTCE to generated or prevent generation of specific items and recipes. For example MaterialIngot will generate Ingot, Block, Nugget and Dust (in all three sizes). But no plate. If Plate is required then it has to be specified via flag GENERATE_PLATE.

Using more then one Flag

More then one flag can be specified for example if GENERATE_PLATE and GENERATE_ROD is used Material will generate both Plate and Rod. This is done be binary OR.

Limitation

Not all Material Flags can be applied to every Material. For example it does not make sense to generate Lens from Ingot Material like Iron. So flag will be ignored.

Mistake correction and flag superseding

System is designed to fix possible problems regarding missing steps in generation. For example if flag GENERATE_FINE_WIRE is used but flag GENERATE_FOIL is missing it will be automatically applied as Fine Wire could not be created without Foil. Best superseding example is EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPES and EXCLUDE_BLOCK_CRAFTING_RECIPES first will remove recipes for hand crafting and second one will do same as first one plus removes also recipes for extruding and alloy smelting recipes via SHAPE_EXTRUDING/MOLD_BLOCK.

Usage

Material flags can be applied either on construction of Material (not available for CT) or later via addFlags. Flags can be added until Material registry freezing and they can't be removed.

API

Creating material with Flags on construction:

IngotMaterial AnnealedCopper = new IngotMaterial(87, "annealed_copper", 0xFF7814, MaterialIconSet.SHINY, 2, of(new MaterialStack(Copper, 1)), GENERATE_PLATE | GENERATE_ROD | GENERATE_BOLT_SCREW | GENERATE_LONG_ROD | GENERATE_GEAR | GENERATE_FOIL | GENERATE_FINE_WIRE | MORTAR_GRINDABLE);

Applying flags later:

IngotMaterial AnnealedCopper = new IngotMaterial(87, "annealed_copper", 0xFF7814, MaterialIconSet.SHINY, 2, of(new MaterialStack(Copper, 1)));
AnnealedCopper.addFlag(GENERATE_PLATE | GENERATE_ROD | GENERATE_BOLT_SCREW | GENERATE_LONG_ROD | GENERATE_GEAR | GENERATE_FOIL | GENERATE_FINE_WIRE | MORTAR_GRINDABLE);

CraftTweaker

Applying flags later:

val specialCopper = MaterialRegistry.createIngotMaterial(500, "special_copper", 0xFF7814, "shiny", 2);
specialCopper.addFlags(["GENERATE_PLATE","GENERATE_ROD","GENERATE_BOLT_SCREW","GENERATE_LONG_ROD","GENERATE_GEAR","GENERATE_FOIL","GENERATE_FINE_WIRE","MORTAR_GRINDABLE"]);

This must be done in a file with a special crafttweaker loader, #loader gregtech at the top of the file.

Flag Table

Flags with ID 0 to 3 (included) are not applicable to Materials they are shown only for completion. Some flags are marked Not implemented as they lack any implementation even if flag is used.

IDNameDescriptionNotesOwner class
0ENABLE_UNIFICATIONOrePrefix
1SELF_REFERENCINGOrePrefix
2FLUID_CONTAINEROrePrefix
3DISALLOW_RECYCLINGOrePrefix
4EXPLOSIVEWhether material is explosiveMaterial
5NO_UNIFICATIONNot implementedMaterial
6NO_RECYCLINGNot implementedMaterial
7BURNINGMaterial with constantly burning auraNot implementedMaterial
8DECOMPOSITION_REQUIRES_HYDROGENDecomposition requires HydrogenAmount of Hydrogen needed is equal to material inputMaterial
9GENERATE_PLASMAMaterial will generate Plasma fluidFluidMaterial
10STATE_GASMaterial is of gaseous stateAir for exampleFluidMaterial
11GENERATE_OREOres for this material will be generatedDustMaterial
12GENERATE_PLATEMaterial will generate PlateRecipe will be generated in Bending Machine for Ingot Material in Compressor for Dust Material and in Cutting Saw if Material has block formDustMaterial
13NO_WORKINGMaterial can be worked only by smashing or smeltingDustMaterial
14NO_SMASHINGMaterial cannot be used for regular Metal working techniques since it is not possible to bend itDustMaterial
15NO_SMELTINGMaterial cannot be smeltedDustMaterial
16INDUCTION_SMELTING_LOW_OUTPUTMaterial will output less in Induction SmelterDustMaterial
17SMELT_INTO_FLUIDMaterial can be smelted to to fluidThis will generate fluid for itDustMaterial
18EXCLUDE_BLOCK_CRAFTING_RECIPESMaterial will not create extruding and alloy smelting recipes via SHAPE_EXTRUDING/MOLD_BLOCKThis supersedes EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPESDustMaterial
19EXCLUDE_PLATE_COMPRESSOR_RECIPEMaterial will not generate recipe for Plate like item in CompressorExample is Paper which does not recipe for Chad to Paper as Wood Pulp to Wood Plank hasDustMaterial
20GENERATE_RODMaterial will generate RodSolidMaterial
21GENERATE_GEARMaterial will generate GearSolidMaterial
22GENERATE_LONG_RODMaterial will generate Long RodSolidMaterial
24MORTAR_GRINDABLEMaterial will be grindable in MortarApplies only to ingots, gems, platesSolidMaterial
25GENERATE_FOILMaterial will generate FoilIngotMaterial
26GENERATE_BOLT_SCREWMaterial will generate Bolt and ScrewIngotMaterial
27GENERATE_RINGMaterial will generate RingIngotMaterial
28GENERATE_SPRINGMaterial will generate SpringIngotMaterial
29GENERATE_FINE_WIREMaterial will generate Fine WireIngotMaterial
30GENERATE_ROTORMaterial will generate RotorIngotMaterial
31GENERATE_SMALL_GEARMaterial will generate Small GearIngotMaterial
32GENERATE_DENSEMaterial will generate Dense PlateIngotMaterial
33GENERATE_SPRING_SMALLMaterial will generate Small SpringNot implementedIngotMaterial
34CRYSTALLISABLEMaterial will generate Autoclave recipe from dust to gemGemMaterial
35BLAST_FURNACE_CALCITE_DOUBLENot implementedIngotMaterial
36BLAST_FURNACE_CALCITE_TRIPLENot implementedIngotMaterial
37GENERATE_LENSEMaterial will generate LensGemMaterial
38HIGH_SIFTER_OUTPUTWhether this Material should produce more output in SifterGemMaterial
40DECOMPOSITION_BY_ELECTROLYZINGAllows decomposition via ElectrolyzerMaterial
41DECOMPOSITION_BY_CENTRIFUGINGAllows decomposition via CentrifugeMaterial
42FLAMMABLEWhether material is flammableMaterial
43DISABLE_DECOMPOSITIONMaterial will not allow decomposition same goes for materials which are using this one as componentOverrides DECOMPOSITION_BY_ELECTROLYZING and DECOMPOSITION_BY_CENTRIFUGINGMaterial
44GENERATE_FLUID_BLOCKWhether this Material should have place-able fluid blockFluidMaterial
45GENERATE_FRAMEMaterial will generate FrameSolidMaterial
46EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPESMaterial will not create Shapeless recipes for dust to block and vice versaDustMaterial

Clone this wiki locally