Skip to content

Commit 1a6ee44

Browse files
committed
Element creation
1 parent 0050177 commit 1a6ee44

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Element Creation
3+
---
4+
# Element Creation
5+
6+
Elements are the base of GT materials. Registering an element WILL NOT add any items.
7+
8+
Elements can be created using `GTElements#createAndRegister` for ease of use. If you choose to declare them yourself, keep in mind you need to register your elements to `GTRegistries.ELEMENTS`
9+
10+
Elements have the following parameters:
11+
12+
2. `long protons` -> Amount of Protons (use -1 if it is not an element that will get a material).
13+
3. `long neutrons` -> Amount of Neutrons (use -1 if it is not an element that will get a material).
14+
4. `long halfLifeSeconds` -> Amount of Half Life this Material has in Seconds. -1 for stable Materials
15+
5. `String decayTo` -> String representing the Elements this element decays to. Separated by an '&' Character
16+
1. `String name` -> Name of the Element
17+
6. `String symbol` -> Symbol of the element. Used to represent the element in chemical formulas (eg. H for hydrogen, Zn for Zinc)
18+
7. `boolean isIsotope` -> Is this element an isotope? (eg. Uranium-235 and Uranium-238)
19+
20+
21+
??? example
22+
```java
23+
public static final Element Xz = GTElements.createAndRegister(16, 18, -1, null, "XYZ", "Xz", false);
24+
```
25+
26+
When a material will be created from this element, the above properties will affect the auto-generated recipes.
27+
28+
29+
!!! info "Mass number"
30+
31+
The mass number of an element is the sum of its protons and neutrons. This affects the duration of some recipes, including wiremills and benders. A higher mass number usually means the recipe takes longer to run. This affects any materials that are composed of the element as well
32+
33+
## Registration
34+
Once your Element(s) are declared, they can be registered using IGTAddon#registerElements. See [here](../Setup.md#registering-your-content)

0 commit comments

Comments
 (0)