aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/material/Particle.java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-12-15 16:11:54 +0100
committerGitHub <noreply@github.com>2021-12-15 16:11:54 +0100
commit128c74faa99dfef8d056c1d82c6e4388b9d470e8 (patch)
tree2c84162154ba681232f86dffd4106db530236814 /src/Java/gtPlusPlus/core/material/Particle.java
parent47ce336f288a45aa3244c8ae1177499fa5080942 (diff)
parentff4b8c7068c2ea7d654e9beda00646d23e62b314 (diff)
downloadGT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.tar.gz
GT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.tar.bz2
GT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.zip
Merge pull request #65 from GTNewHorizons/unified-build-script2
Move sources and resources
Diffstat (limited to 'src/Java/gtPlusPlus/core/material/Particle.java')
-rw-r--r--src/Java/gtPlusPlus/core/material/Particle.java153
1 files changed, 0 insertions, 153 deletions
diff --git a/src/Java/gtPlusPlus/core/material/Particle.java b/src/Java/gtPlusPlus/core/material/Particle.java
deleted file mode 100644
index e93129ec58..0000000000
--- a/src/Java/gtPlusPlus/core/material/Particle.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package gtPlusPlus.core.material;
-
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.item.chemistry.IonParticles;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import net.minecraft.item.ItemStack;
-
-public class Particle {
-
- public static final Particle GRAVITON;
-
- public static final Particle UP;
- public static final Particle DOWN;
- public static final Particle CHARM;
- public static final Particle STRANGE;
- public static final Particle TOP;
- public static final Particle BOTTOM;
-
- public static final Particle ELECTRON;
- public static final Particle ELECTRON_NEUTRINO;
- public static final Particle MUON;
- public static final Particle MUON_NEUTRINO;
- public static final Particle TAU;
- public static final Particle TAU_NEUTRINO;
-
- public static final Particle GLUON;
- public static final Particle PHOTON;
- public static final Particle Z_BOSON;
- public static final Particle W_BOSON;
- public static final Particle HIGGS_BOSON;
-
- public static final Particle PROTON;
- public static final Particle NEUTRON;
- public static final Particle LAMBDA;
- public static final Particle OMEGA;
-
- public static final Particle PION;
- public static final Particle ETA_MESON;
-
- public static final Particle UNKNOWN;
-
- public static final AutoMap<Particle> aMap = new AutoMap<Particle>();
-
- static {
-
- /*
- * Standard Model of Physics
- */
-
- //I exist, because I must.
- GRAVITON = new Particle(ElementaryGroup.BOSON, "Graviton");
-
- //Quarks
- UP = new Particle(ElementaryGroup.QUARK, "Up");
- DOWN = new Particle(ElementaryGroup.QUARK, "Down");
- CHARM = new Particle(ElementaryGroup.QUARK, "Charm");
- STRANGE = new Particle(ElementaryGroup.QUARK, "Strange");
- TOP = new Particle(ElementaryGroup.QUARK, "Top");
- BOTTOM = new Particle(ElementaryGroup.QUARK, "Bottom");
-
- //Leptons
- ELECTRON = new Particle(ElementaryGroup.LEPTON, "Electron");
- MUON = new Particle(ElementaryGroup.LEPTON, "Muon");
- TAU = new Particle(ElementaryGroup.LEPTON, "Tau");
- ELECTRON_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Electron Neutrino");
- MUON_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Muon Neutrino");
- TAU_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Tau Neutrino");
-
- //Bosons
- GLUON = new Particle(ElementaryGroup.BOSON, "Gluon");
- PHOTON = new Particle(ElementaryGroup.BOSON, "Photon");
- Z_BOSON = new Particle(ElementaryGroup.BOSON, "Z Boson");
- W_BOSON = new Particle(ElementaryGroup.BOSON, "W Boson");
- HIGGS_BOSON = new Particle(ElementaryGroup.BOSON, "Higgs Boson");
-
- /*
- * Composite Particles
- */
-
- //Baryons
- PROTON = new Particle(ElementaryGroup.BARYON, "Proton", new Particle[] {UP, UP, DOWN});
- NEUTRON = new Particle(ElementaryGroup.BARYON, "Neutron", new Particle[] {UP, DOWN, DOWN});
- LAMBDA = new Particle(ElementaryGroup.BARYON, "Lambda", new Particle[] {UP, DOWN, STRANGE});
- OMEGA = new Particle(ElementaryGroup.BARYON, "Omega", new Particle[] {STRANGE, STRANGE, STRANGE});
-
- //Mesons
- PION = new Particle(ElementaryGroup.MESON, "Pion", new Particle[] {MUON, MUON_NEUTRINO});
- ETA_MESON = new Particle(ElementaryGroup.MESON, "ETA Meson", new Particle[] {PION, PION, PION});
-
-
- //Wildcard
- UNKNOWN = new Particle(ElementaryGroup.UNKNOWN, "Unknown");
-
- }
-
- public static enum ElementaryGroup {
- QUARK,
- LEPTON,
- BOSON,
- BARYON,
- MESON,
- UNKNOWN;
- }
-
- public final ElementaryGroup mParticleType;
- public final String mParticleName;
- public final Particle[] mComposition;
-
- public Particle(ElementaryGroup aParticleType, String aParticleName) {
- this(aParticleType, aParticleName, null);
- }
-
- public Particle(ElementaryGroup aParticleType, String aParticleName, Particle[] aComposition) {
- mParticleType = aParticleType;
- mParticleName = aParticleName;
- mComposition = aComposition == null ? new Particle[] {this} : aComposition;
- aMap.put(this);
- }
-
-
- public static ItemStack getIon(String aElementName, int aCharge) {
- for (String g : gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.keySet()) {
- if (g.toLowerCase().equals(Utils.sanitizeString(aElementName.toLowerCase()))){
- Integer meta = gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.get(Utils.sanitizeString(aElementName.toLowerCase()));
- if (meta == null) {
- meta = 0;
- }
- ItemStack aIon = ItemUtils.simpleMetaStack(ModItems.itemIonParticleBase, meta, 1);
- if (aCharge != 0) {
- IonParticles.setChargeState(aIon, aCharge);
- }
- return aIon;
- }
- }
- return null;
- }
-
- public static ItemStack getBaseParticle(Particle aParticle) {
- String aPartName = Utils.sanitizeString(aParticle.mParticleName.toLowerCase());
- for (String g : gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.keySet()) {
- if (g.toLowerCase().equals(aPartName)){
- Integer meta = gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.get(aPartName);
- if (meta == null) {
- meta = 0;
- }
- return ItemUtils.simpleMetaStack(ModItems.itemStandarParticleBase, meta, 1);
- }
- }
- return null;
- }
-}