Skip to content

Commit 7c23a95

Browse files
authored
Rework element creation docs (#4367)
1 parent ce51110 commit 7c23a95

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

docs/content/Modpacks/Materials-and-Elements/02-Element-Creation.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@ title: Element Creation
44

55

66
## Element Creation
7-
7+
!!! Note
8+
You can add only elements that are not yet present on the periodic table.
9+
For those elements, see GTElements.
810
Elements are the base of GT materials. Registering an element WILL NOT add any items.
9-
To make a new element(NOTE: you can add only elements that are NOT present on the periodic table),
10-
write an `event.create()` call in the registry function like in the example below.
11-
Inside the parentheses the following parameters are introduced:
12-
13-
1. Element Name -> use '' or "" to write the element name.
14-
2. Proton Count(use -1 if it is not an element that will get a material).
15-
3. Neutron Count(use -1 if it is not an element that will get a material).
16-
4. Half Life Seconds(decay stuff. Use -1 if you don't need to use decay).
17-
5. Material to decay to(more decay stuff. Use null).
18-
6. Atomic Symbol(what will be displayed as in chemical formulas) -> use '' or "" to write the atomic symbol.
19-
7. Is isotope(ex. Uranium 235 and Uranium 238. Use false if you are not making an isotope)
20-
21-
When a material will be created from this element, the above properties will affect the auto-generated recipes.
2211

2312
```js
2413
GTCEuStartupEvents.registry('gtceu:element', event => {
25-
event.create('test_element', 27, 177, -1, null, 'test', false) // (1)
14+
event.create('test_element')
15+
.protons(27)
16+
.neutrons(177)
17+
.halfLifeSeconds(-1)
18+
.decayTo(null)
19+
.symbol('test')
20+
.isIsotope(false)
2621
})
2722
```
2823

29-
1. Element Name, Protons, Neutrons, Half Life Seconds, Decay To, Atomic Symbol, Is Isotope
24+
1. `.create(String name)` -> The element name.
25+
2. `.protons(int protons)` -> Proton Count. Use `-1` if it is an element that will not get a material.
26+
3. `.neutrons(int neutrons)` -> Neutron Count. Use `-1` if it is an element that will not get a material
27+
4. `.halfLifeSeconds(int seconds)` -> Half Life Decay in Seconds. After N seconds, half of the material will have decayed. Use `-1` if your element doesn't decay.
28+
5. `.decayTo(Material material)` -> Material to decay to. Use `null` if your element doesn't decay.
29+
6. `.symbol(String symbol)` -> Atomic Symbol, which will be displayed as in chemical formulas.
30+
7. `.isIsotope(boolean isotope)` -> Whether the element is an isotope, e.g. Uranium 235 and Uranium 238.
31+
32+
When a material will be created from this element, the above properties will affect the auto-generated recipes.

0 commit comments

Comments
 (0)