aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnknown <tudurap.com@gmail.com>2019-07-18 10:21:19 +0200
committerUnknown <tudurap.com@gmail.com>2019-07-18 10:21:19 +0200
commit3db34bec2ef002d9e489eda4b01d75021172e003 (patch)
tree04ab85608ffc8f975c1062427e5048f98c2aa23c /src
parent1b4b27221ed97a3a4954d0136dc978ed5ee139d4 (diff)
parentcd306be2a326f283bda73abba7f6f20e67384e8c (diff)
downloadGT5-Unofficial-3db34bec2ef002d9e489eda4b01d75021172e003.tar.gz
GT5-Unofficial-3db34bec2ef002d9e489eda4b01d75021172e003.tar.bz2
GT5-Unofficial-3db34bec2ef002d9e489eda4b01d75021172e003.zip
Merge remote-tracking branch 'origin/BassAddons' into BassAddons
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java2
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java2
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java26
-rw-r--r--src/main/java/com/github/technus/tectech/font/TecTechFontRender.java277
-rw-r--r--src/main/java/com/github/technus/tectech/loader/ElementalLoader.java6
-rw-r--r--src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java4
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalInstanceStackMap.java37
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java19
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java16
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java14
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/iElementalDefinition.java6
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java14
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dAtomDefinition.java (renamed from src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java)40
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java (renamed from src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java)22
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/iaeaNuclide.java (renamed from src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java)2
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/ClientProxy.java37
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/CommonProxy.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java35
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java27
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java26
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java23
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/renderElemental/IElementalItem.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java74
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java18
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java20
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Uncertainty.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java2
-rw-r--r--src/main/resources/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/energyLevels.csv (renamed from src/main/resources/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/energyLevels.csv)0
-rw-r--r--src/main/resources/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/nuclides.csv (renamed from src/main/resources/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/nuclides.csv)0
-rw-r--r--src/main/resources/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/nuclidesTable.csv (renamed from src/main/resources/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/nuclidesTable.csv)0
36 files changed, 686 insertions, 109 deletions
diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
index a7cb8bb8a0..ad24f72cb0 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
@@ -6,7 +6,7 @@ import net.minecraftforge.fluids.FluidStack;
import java.lang.reflect.Method;
-import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.*;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.*;
public class GtppAtomLoader implements Runnable{
//region reflect a bit
diff --git a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java
index c22c6c4b95..e8163833ee 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java
@@ -3,7 +3,7 @@ package com.github.technus.tectech.compatibility.openmodularturrets.entity.proje
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.hadron.dHadronDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition;
import gregtech.api.GregTech_API;
import gregtech.api.util.GT_Utility;
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
index 77dffad225..059ac44da3 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
@@ -109,6 +109,25 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme
}
@Override
+ public String getShortSymbol() {
+ StringBuilder symbol = new StringBuilder(8);
+ for (cElementalDefinitionStack aspect : aspectStacks.values()) {
+ if (aspect.definition instanceof ePrimalAspectDefinition) {
+ for (int i = 0; i < aspect.amount; i++) {
+ symbol.append(aspect.definition.getShortSymbol());
+ }
+ } else {
+ symbol.append('(');
+ for (int i = 0; i < aspect.amount; i++) {
+ symbol.append(aspect.definition.getShortSymbol());
+ }
+ symbol.append(')');
+ }
+ }
+ return symbol.toString();
+ }
+
+ @Override
public NBTTagCompound toNBT() {
return getNbtTagCompound(nbtType, aspectStacks);
}
@@ -267,6 +286,13 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme
}
@Override
+ public void addScanShortSymbols(ArrayList<String> lines, int capabilities, long energyLevel) {
+ if(Util.areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS, capabilities)) {
+ lines.add(getShortSymbol());
+ }
+ }
+
+ @Override
public void addScanResults(ArrayList<String> lines, int capabilities, long energyLevel) {
if(Util.areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) {
lines.add("CLASS = " + nbtType + ' ' + getClassType());
diff --git a/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java b/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java
new file mode 100644
index 0000000000..a7130bab90
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java
@@ -0,0 +1,277 @@
+package com.github.technus.tectech.font;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+@SideOnly(Side.CLIENT)
+public class TecTechFontRender extends FontRenderer {
+ public static final TecTechFontRender INSTANCE = new TecTechFontRender();
+
+ private static float DISTANCE_L = .125F;
+ private static float DISTANCE_L2 = DISTANCE_L *2F;
+
+ private static float DISTANCE_M = 0.06F;
+ private static float DISTANCE_M2 = DISTANCE_M *2F;
+
+ private static float DISTANCE_A = 0.06F;
+ private static float DISTANCE_A2 = DISTANCE_A *2F;
+
+ private static final Method reset;
+ private static final Method render;
+
+ private final GameSettings gameSettings;
+
+ static {
+ Method resetMethod,renderMethod;
+ try {
+ resetMethod =FontRenderer.class.getDeclaredMethod("resetStyles");
+ renderMethod=FontRenderer.class.getDeclaredMethod("renderString", String.class, int.class, int.class, int.class, boolean.class);
+ } catch (NoSuchMethodException e) {
+ try {
+ resetMethod =FontRenderer.class.getDeclaredMethod("func_78265_b");
+ renderMethod=FontRenderer.class.getDeclaredMethod("func_78258_a", String.class, int.class, int.class, int.class, boolean.class);
+ } catch (NoSuchMethodException ex) {
+ throw new RuntimeException("Cannot get methods!",ex);
+ }
+ }
+ resetMethod.setAccessible(true);
+ renderMethod.setAccessible(true);
+ reset=resetMethod;
+ render=renderMethod;
+ }
+
+ private TecTechFontRender() {
+ super(Minecraft.getMinecraft().gameSettings, new ResourceLocation("textures/font/ascii.png"), Minecraft.getMinecraft().renderEngine, false);
+ gameSettings = Minecraft.getMinecraft().gameSettings;
+ }
+
+ private void resetStyles2(){
+ try {
+ reset.invoke(this);
+ } catch (IllegalAccessException | InvocationTargetException e) {
+ throw new RuntimeException("Cannot run method resetStyles!",e);
+ }
+ }
+
+ private int renderString2(String str, int x, int y, int color, boolean dropShadow){
+ try {
+ return (int)render.invoke(this,str,x,y,color,dropShadow);
+ } catch (IllegalAccessException | InvocationTargetException e) {
+ throw new RuntimeException("Cannot run method renderString!",e);
+ }
+ }
+
+
+ @Override
+ public int drawString(String str, int x, int y, int color, boolean dropShadow) {
+ switch (gameSettings.guiScale){
+ case 0:
+ setUnicodeFlag(true);
+ y--;
+ GL11.glPushMatrix();
+
+ if (dropShadow)
+ {
+ GL11.glTranslatef(DISTANCE_A, DISTANCE_A, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(-DISTANCE_A2, 0, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(0, -DISTANCE_A2, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(DISTANCE_A2, 0, 0F);
+ }
+
+ GL11.glTranslatef(DISTANCE_A, DISTANCE_A, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(-DISTANCE_A2, 0, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(0, -DISTANCE_A2, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(DISTANCE_A2, 0, 0F);
+
+ GL11.glPopMatrix();
+ break;
+ case 1:
+ return Minecraft.getMinecraft().fontRenderer.drawString(str, x, y, color, dropShadow);
+ case 2:
+ setUnicodeFlag(true);
+ y--;
+ GL11.glPushMatrix();
+
+ if (dropShadow)
+ {
+ GL11.glTranslatef(DISTANCE_M, DISTANCE_M, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(-DISTANCE_M2, 0, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(0, -DISTANCE_M2, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(DISTANCE_M2, 0, 0F);
+ }
+
+ GL11.glTranslatef(DISTANCE_M, DISTANCE_M, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(-DISTANCE_M2, 0, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(0, -DISTANCE_M2, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(DISTANCE_M2, 0, 0F);
+
+ GL11.glPopMatrix();
+ break;
+ case 3:
+ setUnicodeFlag(true);
+ y--;
+ GL11.glPushMatrix();
+
+ if (dropShadow)
+ {
+ GL11.glTranslatef(DISTANCE_L, DISTANCE_L, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(-DISTANCE_L2, 0, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(0, -DISTANCE_L2, 0F);
+ drawStringBack(str, x, y, color);
+ GL11.glTranslatef(DISTANCE_L2, 0, 0F);
+ }
+
+ GL11.glTranslatef(DISTANCE_L, DISTANCE_L, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(-DISTANCE_L2, 0, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(0, -DISTANCE_L2, 0F);
+ drawStringFront(str, x, y, color);
+ GL11.glTranslatef(DISTANCE_L2, 0, 0F);
+
+ GL11.glPopMatrix();
+ break;
+ }
+ return drawStringFront(str, x, y, color);
+ }
+
+ @Override
+ public void drawSplitString(String str, int x, int y, int maxWidth, int color) {
+ switch (gameSettings.guiScale){
+ case 0:
+ setUnicodeFlag(true);
+ y--;
+ GL11.glPushMatrix();
+
+ GL11.glTranslatef(DISTANCE_A, DISTANCE_A, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(-DISTANCE_A2, 0, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(0, -DISTANCE_A2, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(DISTANCE_A2, 0, 0F);
+
+ GL11.glPopMatrix();
+ break;
+ case 1:
+ Minecraft.getMinecraft().fontRenderer.drawSplitString(str, x, y, maxWidth, color);
+ break;
+ case 2:
+ setUnicodeFlag(true);
+ y--;
+ GL11.glPushMatrix();
+
+ GL11.glTranslatef(DISTANCE_M, DISTANCE_M, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(-DISTANCE_M2, 0, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(0, -DISTANCE_M2, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(DISTANCE_M2, 0, 0F);
+
+ GL11.glPopMatrix();
+ break;
+ case 3:
+ setUnicodeFlag(true);
+ y--;
+ GL11.glPushMatrix();
+
+ GL11.glTranslatef(DISTANCE_L, DISTANCE_L, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(-DISTANCE_L2, 0, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(0, -DISTANCE_L2, 0F);
+ super.drawSplitString(str, x, y, maxWidth, color);
+ GL11.glTranslatef(DISTANCE_L2, 0, 0F);
+
+ GL11.glPopMatrix();
+ break;
+ }
+ }
+
+ private int drawStringFront(String p_85187_1_, int p_85187_2_, int p_85187_3_, int p_85187_4_) {
+ enableAlpha();
+ resetStyles2();
+ return renderString2(p_85187_1_, p_85187_2_, p_85187_3_, p_85187_4_, false);
+ }
+
+ private int drawStringBack(String p_85187_1_, int p_85187_2_, int p_85187_3_, int p_85187_4_) {
+ enableAlpha();
+ resetStyles2();
+ return renderString2(p_85187_1_, p_85187_2_ + 1, p_85187_3_ + 1, p_85187_4_, true);
+ }
+
+ @Override
+ public int getStringWidth(String p_78256_1_)
+ {
+ if(gameSettings.guiScale==1){
+ return Minecraft.getMinecraft().fontRenderer.getStringWidth(p_78256_1_);
+ }
+ if (p_78256_1_ == null)
+ {
+ return 0;
+ }
+ else
+ {
+ int i = 0;
+ boolean flag = false;
+
+ for (int j = 0; j < p_78256_1_.length(); ++j)
+ {
+ char c0 = p_78256_1_.charAt(j);
+ int k = this.getCharWidth(c0);
+
+ if (k < 0 && j < p_78256_1_.length() - 1)
+ {
+ ++j;
+ c0 = p_78256_1_.charAt(j);
+
+ if (c0 != 108 && c0 != 76)
+ {
+ if (c0 == 114 || c0 == 82)
+ {
+ flag = false;
+ }
+ }
+ else
+ {
+ flag = true;
+ }
+
+ k = 0;
+ }
+
+ i += k;
+
+ if (flag && k > 0)
+ {
+ ++i;
+ }
+ }
+
+ return i;
+ }
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/loader/ElementalLoader.java b/src/main/java/com/github/technus/tectech/loader/ElementalLoader.java
index 130106a76b..79ad5dc98c 100644
--- a/src/main/java/com/github/technus/tectech/loader/ElementalLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/ElementalLoader.java
@@ -3,9 +3,9 @@ package com.github.technus.tectech.loader;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElementalPrimitive;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.iaeaNuclide;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.hadron.dHadronDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.iaeaNuclide;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.*;
/**
diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java
index 56f461eeb5..8a0fb20c59 100644
--- a/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java
@@ -2,8 +2,8 @@ package com.github.technus.tectech.loader.recipe;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.compatibility.dreamcraft.DreamCraftRecipeLoader;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.hadron.dHadronDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
import com.github.technus.tectech.thing.CustomItemList;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
import com.github.technus.tectech.thing.item.ConstructableTriggerItem;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java b/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java
index dc7e8faef7..2a770ea332 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java
@@ -8,7 +8,7 @@ import com.github.technus.tectech.mechanics.data.ChunkDataHandler;
import com.github.technus.tectech.mechanics.data.ChunkDataMessage;
import com.github.technus.tectech.mechanics.data.IChunkMetaDataHandler;
import com.github.technus.tectech.mechanics.data.PlayerDataMessage;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
import cpw.mods.fml.common.gameevent.TickEvent;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalInstanceStackMap.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalInstanceStackMap.java
index bfbe93bb4f..5893ac1a1f 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalInstanceStackMap.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalInstanceStackMap.java
@@ -316,6 +316,15 @@ public final class cElementalInstanceStackMap implements Comparable<cElementalIn
return var.toArray(new cElementalInstanceStack[0])[i];
}
+ public String[] getShortSymbolsInfo() {
+ String[] info = new String[map.size()];
+ int i = 0;
+ for (cElementalInstanceStack instance : map.values()) {
+ info[i++] = instance.definition.getShortSymbol();
+ }
+ return info;
+ }
+
public String[] getElementalInfo() {
String[] info = new String[map.size() * 4];
int i = 0;
@@ -329,6 +338,14 @@ public final class cElementalInstanceStackMap implements Comparable<cElementalIn
return info;
}
+ public ArrayList<String> getScanShortSymbols(int[] capabilities) {
+ ArrayList<String> list=new ArrayList<>(16);
+ for(Map.Entry<iElementalDefinition,cElementalInstanceStack> e:map.entrySet()){
+ e.getValue().addScanShortSymbols(list,capabilities);
+ }
+ return list;
+ }
+
public ArrayList<String> getScanInfo(int[] capabilities) {
ArrayList<String> list=new ArrayList<>(16);
for(Map.Entry<iElementalDefinition,cElementalInstanceStack> e:map.entrySet()){
@@ -412,6 +429,16 @@ public final class cElementalInstanceStackMap implements Comparable<cElementalIn
}
//NBT
+ public NBTTagCompound getShortSymbolsNBT() {
+ NBTTagCompound nbt = new NBTTagCompound();
+ String[] info = getShortSymbolsInfo();
+ nbt.setInteger("i", info.length);
+ for (int i = 0; i < info.length; i++) {
+ nbt.setString(Integer.toString(i), info[i]);
+ }
+ return nbt;
+ }
+
public NBTTagCompound getInfoNBT() {
NBTTagCompound nbt = new NBTTagCompound();
String[] info = getElementalInfo();
@@ -422,6 +449,16 @@ public final class cElementalInstanceStackMap implements Comparable<cElementalIn
return nbt;
}
+ public NBTTagCompound getScanShortSymbolsNBT(int[] capabilities) {
+ NBTTagCompound nbt = new NBTTagCompound();
+ ArrayList<String> info = getScanShortSymbols(capabilities);
+ nbt.setInteger("i", info.size());
+ for (int i = 0; i < info.size(); i++) {
+ nbt.setString(Integer.toString(i), info.get(i));
+ }
+ return nbt;
+ }
+
public NBTTagCompound getScanInfoNBT(int[] capabilities) {
NBTTagCompound nbt = new NBTTagCompound();
ArrayList<String> info = getScanInfo(capabilities);
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java
index fb6acec084..dbbfa7bf66 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java
@@ -34,6 +34,15 @@ abstract class cElementalStackMap implements Comparable<cElementalStackMap> {
return map.get(def);
}
+ public String[] getShortSymbolsInfo() {
+ String[] info = new String[map.size()];
+ int i = 0;
+ for (cElementalDefinitionStack instance : map.values()) {
+ info[i++] = instance.definition.getShortSymbol();
+ }
+ return info;
+ }
+
public final String[] getElementalInfo() {
String[] info = new String[map.size() * 3];
int i = 0;
@@ -86,6 +95,16 @@ abstract class cElementalStackMap implements Comparable<cElementalStackMap> {
}
//NBT
+ public final NBTTagCompound getShortSymbolsNBT() {
+ NBTTagCompound nbt = new NBTTagCompound();
+ String[] info = getShortSymbolsInfo();
+ nbt.setInteger("i", info.length);
+ for (int i = 0; i < info.length; i++) {
+ nbt.setString(Integer.toString(i), info[i]);
+ }
+ return nbt;
+ }
+
public final NBTTagCompound getInfoNBT() {
NBTTagCompound nbt = new NBTTagCompound();
String[] info = getElementalInfo();
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java
index 7c04fe2c40..ba3c8f909c 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java
+++ b/