From 499411aa21ac4a742b6d51ef3ce9c4046d0a22c1 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 25 Jan 2019 04:34:06 +0000 Subject: + Added recipes to obtain Astral Titanium, Celestial Tungsten Advanced Nitinol and Chromatic Glass. + Added Particle Physics, so some basic extent. + Added new textures for some Meta items. + Added new textures for all particles and ions. + Added Custom Debug NBT to error ingots, in the event one is obtained by a player. + Added more information to the tooltip of Control Cores. + Added more uniform ways to obtain tiered item components to CI. - Hard disable of GC Fuel tweaks for the moment. % Hopefully greatly improved the cape handler. Cape list is now stored on Overmind's site, meaning it can be updated outside of the mod. % Cape Handler now will store the cape data locally in a .dat for offline use, this can be updated anytime by removing it, or once a week if outdated) % Tweaked Cyclotron Recipe map to support new changes to functionality. % Tweaked RTG fuel pellet production time in Cyclotron to be 100x. % Adjusted requirements for Quicklime to generate (It may vanish after this commit, May be worth rolling back if an issue.). % Adjusted code to use checkForInvalidItems instead of direct item comparisons in several places. % Renamed Buffer Cores to Energy Cores. % Adjusted recipes for Energy Cores and Energy Buffers, they now require 6 slot assembly. $ Fixed Multiblock handling during structure checks, they'd accidentally detect the controller as an invalid block. --- src/Java/gtPlusPlus/core/material/Particle.java | 47 +++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/core/material/Particle.java') diff --git a/src/Java/gtPlusPlus/core/material/Particle.java b/src/Java/gtPlusPlus/core/material/Particle.java index 6cc0f878d6..e93129ec58 100644 --- a/src/Java/gtPlusPlus/core/material/Particle.java +++ b/src/Java/gtPlusPlus/core/material/Particle.java @@ -1,6 +1,11 @@ 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 { @@ -34,6 +39,8 @@ public class Particle { public static final Particle PION; public static final Particle ETA_MESON; + public static final Particle UNKNOWN; + public static final AutoMap aMap = new AutoMap(); static { @@ -80,7 +87,11 @@ public class Particle { //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}); + ETA_MESON = new Particle(ElementaryGroup.MESON, "ETA Meson", new Particle[] {PION, PION, PION}); + + + //Wildcard + UNKNOWN = new Particle(ElementaryGroup.UNKNOWN, "Unknown"); } @@ -89,7 +100,8 @@ public class Particle { LEPTON, BOSON, BARYON, - MESON; + MESON, + UNKNOWN; } public final ElementaryGroup mParticleType; @@ -107,4 +119,35 @@ public class Particle { 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; + } } -- cgit