-
Notifications
You must be signed in to change notification settings - Fork 149
MaterialFlags
This page should provide information regarding what Material Flags are which are available and how to use them.
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.
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.
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.
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.
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.
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);
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"]);
ID | Name | Description | Notes | Owner class |
---|---|---|---|---|
11 | GENERATE_ORE | Ores for this material will be generated | DustMaterial | |
12 | GENERATE_PLATE | Material will generate Plate | Recipe will be generated in Bending Machine for Ingot Material in Compressor for Dust Material and in Cutting Saw if Material has block form | DustMaterial |
13 | NO_WORKING | Material can be worked only by smashing or smelting | DustMaterial | |
14 | NO_SMASHING | Material cannot be used for regular Metal working techniques since it is not possible to bend it | DustMaterial | |
15 | NO_SMELTING | Material cannot be smelted | DustMaterial | |
16 | INDUCTION_SMELTING_LOW_OUTPUT | Material will output less in Induction Smelter | DustMaterial | |
17 | SMELT_INTO_FLUID | Material can be smelted to to fluid | This will generate fluid for it | DustMaterial |
18 | EXCLUDE_BLOCK_CRAFTING_RECIPES | Material will not create extruding and alloy smelting recipes via SHAPE_EXTRUDING/MOLD_BLOCK | This supersedes EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPES | DustMaterial |
19 | EXCLUDE_PLATE_COMPRESSOR_RECIPE | Material will not generate recipe for Plate like item in Compressor | Example is Paper which does not recipe for Chad to Paper as Wood Pulp to Wood Plank has | DustMaterial |
46 | EXCLUDE_BLOCK_CRAFTING_BY_HAND_RECIPES | Material will not create Shapeless recipes for dust to block and vice versa | DustMaterial |