Skip to main content
General Mechanics models the full periodic table as in-game items. Every metallic element registered in ElementType is given a complete set of physical forms, all items are placed in the dedicated Elements creative tab (CoreTab.ELEMENTS), and ore blocks for naturally-occurring elements are generated in the world via the OreBlock class.

Item Forms

Every element registered through CoreElements.elementIngot() automatically produces seven associated items:
FormExample
Ingottitanium_ingot
Rawtitanium_raw
Nuggettitanium_nugget
Dusttitanium_dust
Platetitanium_plate
Piletitanium_pile
Rodtitanium_rod
All seven items are registered in a single call:
public static ItemDefinition<ElementItem> elementIngot(ElementType element) {
    String name = element.getDisplayName() + " Ingot";
    return ingot(name, (properties) -> new ElementItem(properties, element));
}
The ingot() helper registers each sub-item by deriving its name and resource path from the ingot name, then wires all sub-item suppliers back to the same ElementItem parent.

ElementType Enum

ElementType is the authoritative source of data for every element. Each entry stores:
  • atomicNumber — position on the periodic table
  • symbol — chemical symbol (e.g. "Fe", "Au")
  • protons / neutrons — nuclear composition
  • atomicWeight — relative atomic mass
  • tintColor — ARGB color applied to item textures
  • isAlloytrue for synthetic alloys that cannot be mined
  • isNaturalfalse for unstable/synthetic elements (no ore spawning)
  • halfLife — decay parameter (unused for stable elements, -1)
Lookup helpers are provided:
// By atomic number
ElementType element = ElementType.getByAtomicNumber(22); // TITANIUM

// By chemical symbol
ElementType element = ElementType.getBySymbol("Au");     // GOLD

Element Categories

Group 1 metals registered in CoreElements.
ElementSymbolAtomic No.
LithiumLi3
SodiumNa11
PotassiumK19
RubidiumRb37
CesiumCs55
FranciumFr87

Ore Generation

Naturally-occurring elements (where isAlloy == false and isNatural == true) have an OreBlock registered via CoreBlocks.registerOre(ElementType):
private static BlockDefinition<OreBlock> registerOre(ElementType element) {
    if (element.isAlloy() || !element.isNatural()) {
        throw new IllegalArgumentException("Attempted to register ore for invalid element: " + element.name());
    }
    String name = element.getDisplayName() + " Ore";
    String resourceName = name.toLowerCase().replace(' ', '_');
    return register(name, GM.getResource(resourceName), () -> new OreBlock(element), null, false);
}
Ore blocks for all registered elements are automatically added to the Elements creative tab. The full list spans periods 2–7, covering elements from Lithium through Uranium that are marked as natural.

Creative Tab Organization

All element items — ingots, raw ores, nuggets, dusts, plates, piles, rods, and ore blocks — are registered into CoreTab.ELEMENTS, which is a separate creative tab from the main General Mechanics tab (CoreTab.MAIN). This keeps the hundreds of element items isolated and easy to browse.

Build docs developers (and LLMs) love