Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GTCEuStartupEvents.registry('gtceu:element', event => {
1. `.create(String name)` -> The element name.
2. `.protons(int protons)` -> Proton Count. Use `-1` if it is an element that will not get a material.
3. `.neutrons(int neutrons)` -> Neutron Count. Use `-1` if it is an element that will not get a material
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.
4. `.halfLifeSeconds(double seconds)` -> Half Life Decay in Seconds. After N seconds, half of the material will have decayed. Use `-1` if your element doesn't decay.
5. `.decayTo(Material material)` -> Material to decay to. Use `null` if your element doesn't decay.
6. `.symbol(String symbol)` -> Atomic Symbol, which will be displayed as in chemical formulas.
7. `.isIsotope(boolean isotope)` -> Whether the element is an isotope, e.g. Uranium 235 and Uranium 238.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Element {
*/
@Getter
@Setter
private long halfLifeSeconds;
private double halfLifeSeconds;
/**
* String representing the Elements this element decays to. Separated by an '&' Character
*/
Expand Down Expand Up @@ -57,7 +57,7 @@ public long mass() {
return protons + neutrons;
}

public Element(long protons, long neutrons, long halfLifeSeconds, String decayTo, String name, String symbol,
public Element(long protons, long neutrons, double halfLifeSeconds, String decayTo, String name, String symbol,
boolean isIsotope) {
this.protons = protons;
this.neutrons = neutrons;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ public class GTElements {

/**
* @deprecated Use
* {@link GTElements#createAndRegister(ResourceLocation, long, long, long, String, String, String, boolean)}
* {@link GTElements#createAndRegister(ResourceLocation, long, long, double, String, String, String, boolean)}
*/
@Deprecated
public static Element createAndRegister(long protons, long neutrons, long halfLifeSeconds, String decayTo,
public static Element createAndRegister(long protons, long neutrons, double halfLifeSeconds, String decayTo,
String name, String symbol, boolean isIsotope) {
return createAndRegister(GTCEu.id(name), protons, neutrons, halfLifeSeconds, decayTo, name, symbol, isIsotope);
}

public static Element createAndRegister(ResourceLocation id, long protons, long neutrons, long halfLifeSeconds,
public static Element createAndRegister(ResourceLocation id, long protons, long neutrons, double halfLifeSeconds,
String decayTo,
String name, String symbol, boolean isIsotope) {
Element element = new Element(protons, neutrons, halfLifeSeconds, decayTo, name, symbol, isIsotope);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public class ElementBuilder extends BuilderBase<Element> {
@Setter
public transient Component translatableName;
@Setter
public transient long protons, neutrons, halfLifeSeconds = -1;
public transient long protons, neutrons;
@Setter
public transient double halfLifeSeconds = -1D;
@Setter
public transient String decayTo, symbol;
@Setter
Expand Down
Loading