aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorTec <daniel112092@gmail.com>2019-07-17 23:15:45 +0200
committerTec <daniel112092@gmail.com>2019-07-17 23:15:45 +0200
commitab28eb1586f1ff4fa41e4cfa20ee802ffc4fc516 (patch)
treee10dc1164a416678ee62301e815811d45a137e7a /src/main/java
parent082fa82c0a7a58f2cef95d5bd2c00920c8ee17e2 (diff)
downloadGT5-Unofficial-ab28eb1586f1ff4fa41e4cfa20ee802ffc4fc516.tar.gz
GT5-Unofficial-ab28eb1586f1ff4fa41e4cfa20ee802ffc4fc516.tar.bz2
GT5-Unofficial-ab28eb1586f1ff4fa41e4cfa20ee802ffc4fc516.zip
Symbol Renderer on containers
Diffstat (limited to 'src/main/java')
-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.java275
-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
33 files changed, 684 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..f20bc28402
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java
@@ -0,0 +1,275 @@
+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_S = 0.06F;
+ private static float DISTANCE_S2 = DISTANCE_S *2F;
+
+ private static float DISTANCE_A = 0.06F;
+ private static float DISTANCE_A2 = DISTANCE_A *2F;
+
+ private Method reset;
+ private Method render;
+
+ private final GameSettings gameSettings;
+
+ private TecTechFontRender() {
+ super(Minecraft.getMinecraft().gameSettings, new ResourceLocation("textures/font/ascii.png"), Minecraft.getMinecraft().renderEngine, false);
+ gameSettings = Minecraft.getMinecraft().gameSettings;
+
+ try {
+ reset =FontRenderer.class.getDeclaredMethod("resetStyles");
+ render=FontRenderer.class.getDeclaredMethod("renderString", String.class, int.class, int.class, int.class, boolean.class);
+ } catch (NoSuchMethodException e) {
+ try {
+ reset =FontRenderer.class.getDeclaredMethod("func_78265_b");
+ render=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);
+ }
+ }
+ reset.setAccessible(true);
+ render.setAccessible(true);
+ }
+
+ 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/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java
@@ -420,6 +420,22 @@ public final class cElementalInstanceStack implements iHasElementalDefinition {
return this;
}
+ public void addScanShortSymbols(ArrayList<String> lines, int[] detailsOnDepthLevels){
+ int capabilities=detailsOnDepthLevels[0];
+ definition.addScanShortSymbols(lines,capabilities,energy);
+ //scanShortSymbolsContents(lines,definition.getSubParticles(),1,detailsOnDepthLevels);
+ }
+
+ //private void scanShortSymbolsContents(ArrayList<String> lines, cElementalDefinitionStackMap definitions, int depth, int[] detailsOnDepthLevels){
+ // if(definitions!=null && depth<detailsOnDepthLevels.length){
+ // int deeper=depth+1;
+ // for(cElementalDefinitionStack definitionStack:definitions.values()) {
+ // definition.addScanShortSymbols(lines,detailsOnDepthLevels[depth],energy);
+ // scanSymbolsContents(lines,definitionStack.definition.getSubParticles(),deeper,detailsOnDepthLevels);
+ // }
+ // }
+ //}
+
public void addScanResults(ArrayList<String> lines, int[] detailsOnDepthLevels){
int capabilities=detailsOnDepthLevels[0];
if(Util.areBitsSet(SCAN_GET_DEPTH_LEVEL,capabilities)) {
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java
index 749d5c687b..63642d6dbd 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java
@@ -18,6 +18,7 @@ import java.util.Map;
import static com.github.technus.tectech.Util.areBitsSet;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.null__;
+import static com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM.stacksRegistered;
import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_scanner.*;
/**
@@ -67,6 +68,7 @@ public abstract class cElementalPrimitive extends cElementalDefinition {
if (bindsBO.put(ID, this) != null) {
Minecraft.getMinecraft().crashed(new CrashReport("Primitive definition", new tElementalException("Duplicate ID")));
}
+ stacksRegistered.add(this);
}
//
@@ -89,6 +91,11 @@ public abstract class cElementalPrimitive extends cElementalDefinition {
}
@Override
+ public String getShortSymbol() {
+ return symbol;
+ }
+
+ @Override
public iElementalDefinition getAnti() {
return anti;//no need for copy
}
@@ -211,6 +218,13 @@ public abstract class cElementalPrimitive extends cElementalDefinition {
}
@Override
+ public void addScanShortSymbols(ArrayList<String> lines, int capabilities, long energyLevel) {
+ if(areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS|SCAN_GET_TIMESPAN_INFO, capabilities)) {
+ lines.add(getShortSymbol());
+ }
+ }
+
+ @Override
public void addScanResults(ArrayList<String> lines, int capabilities, long energyLevel) {
if(areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) {
lines.add("CLASS = " + nbtType + ' ' + getClassType());
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/iElementalDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/iElementalDefinition.java
index 6293e9ccf2..08be835cdf 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/iElementalDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/iElementalDefinition.java
@@ -24,6 +24,10 @@ public abstract class iElementalDefinition implements Comparable<iElementalDefin
public abstract String getSymbol();
+ public abstract String getShortSymbol();
+
+ public abstract void addScanShortSymbols(ArrayList<String> lines, int capabilities, long energyLevel);
+
public abstract void addScanResults(ArrayList<String> lines, int capabilities, long energyLevel);
public abstract byte getType();
@@ -75,7 +79,7 @@ public abstract class iElementalDefinition implements Comparable<iElementalDefin
@Override
public abstract iElementalDefinition clone();
- final /*default*/ int compareClassID(iElementalDefinition obj) {
+ final int compareClassID(iElementalDefinition obj) {
return (int) getClassType() - obj.getClassType();
}
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java
index 367b412201..d0c0bf04aa 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java
@@ -10,7 +10,8 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import java.util.HashMap;
-import java.util.HashSet;
+
+import static com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM.stacksRegistered;
/**
* Created by Tec on 26.05.2017.
@@ -25,8 +26,6 @@ public class bTransformationInfo {
public static final HashMap<Integer,aOredictQuantizationInfo> oredictQuantization=new HashMap<>(32);
public HashMap<iElementalDefinition,aOredictDequantizationInfo> oredictDequantization;
- public static final HashSet<iElementalDefinition> stacksRegistered=new HashSet<>();
-
public bTransformationInfo(int fluidCap,int itemCap, int oreCap){
if(fluidCap>0) {
fluidDequantization = new HashMap<>(fluidCap);
@@ -43,18 +42,21 @@ public class bTransformationInfo {
fluidQuantization.put(fluidStack.getFluidID(),new aFluidQuantizationInfo(fluidStack,em));
fluidDequantization.put(em.getDefinition(),new aFluidDequantizationInfo(em,fluidStack));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addFluid(iHasElementalDefinition em ,int fluidID,int fluidAmount) {
fluidQuantization.put(fluidID,new aFluidQuantizationInfo(fluidID,fluidAmount,em));
fluidDequantization.put(em.getDefinition(),new aFluidDequantizationInfo(em,fluidID,fluidAmount));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addFluid(iHasElementalDefinition em, Fluid fluid, int fluidAmount){
fluidQuantization.put(fluid.getID(),new aFluidQuantizationInfo(fluid,fluidAmount,em));
fluidDequantization.put(em.getDefinition(),new aFluidDequantizationInfo(em,fluid,fluidAmount));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
private void addItemQuantization(aItemQuantizationInfo aIQI){
@@ -65,35 +67,41 @@ public class bTransformationInfo {
addItemQuantization(new aItemQuantizationInfo(itemStack,skipNBT,em));
itemDequantization.put(em.getDefinition(),new aItemDequantizationInfo(em,itemStack));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addItem(iHasElementalDefinition em, OrePrefixes prefix, Materials material, int amount, boolean skipNBT){
addItemQuantization(new aItemQuantizationInfo(prefix,material,amount,skipNBT,em));
itemDequantization.put(em.getDefinition(),new aItemDequantizationInfo(em,prefix,material,amount));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addOredict(iHasElementalDefinition em, int id, int qty){
oredictQuantization.put(id,new aOredictQuantizationInfo(id,qty,em));
oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,id,qty));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addOredict(iHasElementalDefinition em, String name, int qty){
oredictQuantization.put(OreDictionary.getOreID(name),new aOredictQuantizationInfo(name,qty,em));
oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,name,qty));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, Materials material, int qty){
oredictQuantization.put(OreDictionary.getOreID(prefix.name() + material.mName),new aOredictQuantizationInfo(prefix,material,qty,em));
oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,prefix,material,qty));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, String materialName, int qty){
oredictQuantization.put(OreDictionary.getOreID(prefix.name() + materialName),new aOredictQuantizationInfo(prefix,materialName,qty,em));
oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,prefix,materialName,qty));
stacksRegistered.add(em.getDefinition());
+ stacksRegistered.add(em.getDefinition().getAnti());
}
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dAtomDefinition.java
index 86d31bfb1b..e6dc5bcd75 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dAtomDefinition.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom;
+package com.github.technus.tectech.mechanics.elementalMatter.definitions.complex;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
@@ -16,7 +16,6 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemDequantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.hadron.dHadronDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eBosonDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eLeptonDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eNeutrinoDefinition;
@@ -344,12 +343,12 @@ public final class dAtomDefinition extends cElementalDefinition {
@Override
public String getName() {
int element = Math.abs(this.element);
- boolean negative = element < 0;
+ boolean negative = this.element < 0;
try {
- if (type != 1) {
+ if (Math.abs(type) != 1) {
return (negative ? "~? " : "? ") + nomenclature.Name[element];
}
- return negative ? '~' + nomenclature.Name[-element] : nomenclature.Name[element];
+ return negative ? '~' + nomenclature.Name[element] : nomenclature.Name[element];
} catch (Exception e) {
if (DEBUG_MODE) {
e.printStackTrace();
@@ -361,7 +360,7 @@ public final class dAtomDefinition extends cElementalDefinition {
@Override
public String getSymbol() {
int element = Math.abs(this.element);
- boolean negative = element < 0;
+ boolean negative = this.element < 0;
try {
return (negative ? "~" : "") + nomenclature.Symbol[element] + " N:" + neutralCount + " I:" + (neutralCount+element) + " C:" + getCharge();
} catch (Exception e) {
@@ -381,6 +380,28 @@ public final class dAtomDefinition extends cElementalDefinition {
}
@Override
+ public String getShortSymbol() {
+ int element = Math.abs(this.element);
+ boolean negative = this.element < 0;
+ try {
+ return (negative ? "~" : "") + nomenclature.Symbol[element];
+ } catch (Exception e) {
+ if (DEBUG_MODE) {
+ e.printStackTrace();
+ }
+ try {
+ int s100 = element / 100, s1 = element / 10 % 10, s10 = element % 10;
+ return (negative ? "~" : "") + nomenclature.SymbolIUPAC[10 + s100] + nomenclature.SymbolIUPAC[s10] + nomenclature.SymbolIUPAC[s1];
+ } catch (Exception E) {
+ if (DEBUG_MODE) {
+ e.printStackTrace();
+ }
+ return (negative ? "~" : "") + "?";
+ }
+ }
+ }
+
+ @Override
public cElementalDefinitionStackMap getSubParticles() {
return elementalStacks.clone();
}
@@ -1627,6 +1648,13 @@ public final class dAtomDefinition extends cElementalDefinition {
}
@Override
+ public void addScanShortSymbols(ArrayList<String> lines, int capabilities, long energyLevel) {
+ if(Util.areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS|SCAN_GET_TIMESPAN_INFO, 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/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java
index 1d617fcdb9..a1380526eb 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.hadron;
+package com.github.technus.tectech.mechanics.elementalMatter.definitions.complex;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.Util;
@@ -21,7 +21,7 @@ import java.util.ArrayList;
import static com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition.getNbtTagCompound;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
-import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.transformation;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.transformation;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eBosonDefinition.boson_Y__;
import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_scanner.*;
import static gregtech.api.enums.OrePrefixes.dust;
@@ -172,6 +172,17 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi
}
@Override
+ public String getShortSymbol() {
+ StringBuilder symbol = new StringBuilder(8);
+ for (cElementalDefinitionStack quark : quarkStacks.values()) {
+ for (int i = 0; i < quark.amount; i++) {
+ symbol.append(quark.definition.getShortSymbol());
+ }
+ }
+ return symbol.toString();
+ }
+
+ @Override
public byte getColor() {
return -7;
}
@@ -438,6 +449,13 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi
}
@Override
+ public void addScanShortSymbols(ArrayList<String> lines, int capabilities, long energyLevel) {
+ if(Util.areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS|SCAN_GET_TIMESPAN_INFO, 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/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/iaeaNuclide.java
index ac44f9242e..8b54bdd306 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/iaeaNuclide.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom;
+package com.github.technus.tectech.mechanics.elementalMatter.definitions.complex;
import com.github.technus.tectech.Util;
diff --git a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
index 232beebfb6..720460d56b 100644
--- a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
@@ -9,6 +9,9 @@ import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.block.QuantumGlassRender;
import com.github.technus.tectech.thing.block.QuantumStuffBlock;
import com.github.technus.tectech.thing.block.QuantumStuffRender;
+import com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM;
+import com.github.technus.tectech.thing.item.ElementalDefinitionContainer_EM;
+import com.github.technus.tectech.thing.item.renderElemental.RenderElementalName;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Loader;
@@ -16,15 +19,14 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
-import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiNewChat;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
+import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.util.ForgeDirection;
-import org.lwjgl.opengl.GL11;
public class ClientProxy extends CommonProxy {
@Override
@@ -35,6 +37,9 @@ public class ClientProxy extends CommonProxy {
QuantumStuffBlock.renderID = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(QuantumStuffBlock.renderID, new QuantumStuffRender());
+ MinecraftForgeClient.registerItemRenderer(ElementalDefinitionContainer_EM.INSTANCE, RenderElementalName.INSTANCE);
+ MinecraftForgeClient.registerItemRenderer(DebugElementalInstanceContainer_EM.INSTANCE, RenderElementalName.INSTANCE);
+
if(Loader.isModLoaded("openmodularturrets")) {
new TT_turret_loader().run();
}
@@ -120,34 +125,6 @@ public class ClientProxy extends CommonProxy {
}
@Override
- public void renderUnicodeString(String str, int x, int y, int maxWidth, int color) {
- Minecraft mc = Minecraft.getMinecraft();
- FontRenderer fontRenderer = mc.fontRenderer;
-
- boolean origFont = fontRenderer.getUnicodeFlag();
-
- if (mc.gameSettings.guiScale == 3) {
- fontRenderer.setUnicodeFlag(true);
- float dist = 0.08F;
- y--;
- for (int cycle = 0; cycle < 2; cycle++) {
- GL11.glTranslatef(-dist, 0F, 0F);
- fontRenderer.drawSplitString(str, x, y, maxWidth, color);
- GL11.glTranslatef(dist, -dist, 0F);
- fontRenderer.drawSplitString(str, x, y, maxWidth, color);
- GL11.glTranslatef(dist, 0F, 0F);
- fontRenderer.drawSplitString(str, x, y, maxWidth, color);
- GL11.glTranslatef(-dist, dist, 0F);
-
- dist = -dist;
- }
- fontRenderer.setUnicodeFlag(origFont);
- } else {
- fontRenderer.drawSplitString(str, x, y, maxWidth, color);
- }
- }
-
- @Override
public void printInchat(String... strings) {
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (String s : strings) {
diff --git a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
index 296002b527..955b664bd1 100644
--- a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
@@ -34,13 +34,6 @@ public class CommonProxy implements IGuiHandler {
return null;
}
- public void renderUnicodeString(String str, int x, int y, int maxWidth, int color) {
- }
-
- public void setCustomRenderer() {}
-
- public void setCustomRenderers() {}
-
public void broadcast(String str) {
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(new ChatComponentText(str));
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java
index 1f68163238..ab6f06497e 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java
@@ -1,16 +1,18 @@
package com.github.technus.tectech.thing.item;
import com.github.technus.tectech.CommonValues;
+import com.github.technus.tectech.font.TecTechFontRender;
import com.github.technus.tectech.Util;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.iElementalInstanceContainer;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException;
import com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition;
-import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo;
+import com.github.technus.tectech.thing.item.renderElemental.IElementalItem;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.client.gui.FontRenderer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -23,6 +25,7 @@ import net.minecraft.world.World;
import java.util.Collections;
import java.util.List;
+import java.util.TreeSet;
import static com.github.technus.tectech.Reference.MODID;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
@@ -30,7 +33,9 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
/**
* Created by Tec on 15.03.2017.
*/
-public final class DebugElementalInstanceContainer_EM extends Item {
+public final class DebugElementalInstanceContainer_EM extends Item implements IElementalItem {
+ public static final TreeSet<iElementalDefinition> stacksRegistered=new TreeSet<>();
+
public static DebugElementalInstanceContainer_EM INSTANCE;
private DebugElementalInstanceContainer_EM() {
@@ -60,11 +65,13 @@ public final class DebugElementalInstanceContainer_EM extends Item {
}
((iElementalInstanceContainer) metaTE).purgeOverflow();
tNBT.removeTag("content");
+ tNBT.removeTag("symbols");
tNBT.removeTag("info");
} else if (content.hasStacks()) {
((iElementalInstanceContainer) metaTE).purgeOverflow();
tNBT.setTag("info", content.getInfoNBT());
tNBT.setTag("content", content.toNBT());
+ tNBT.setTag("symbols", content.getShortSymbolsNBT());
content.clear();
}
return true;
@@ -90,9 +97,11 @@ public final class DebugElementalInstanceContainer_EM extends Item {
}
tNBT.removeTag("content");
tNBT.removeTag("info");
+ tNBT.removeTag("symbols");
} else if (content.hasStacks()) {
tNBT.setTag("info", content.getInfoNBT());
tNBT.setTag("content", content.toNBT());
+ tNBT.setTag("symbols", content.getShortSymbolsNBT());
content.clear();
}
return aStack;
@@ -125,10 +134,30 @@ public final class DebugElementalInstanceContainer_EM extends Item {
ItemStack that = new ItemStack(this, 1);
that.setTagCompound(new NBTTagCompound());
list.add(that);
- for(iElementalDefinition defintion:bTransformationInfo.stacksRegistered){
+ for(iElementalDefinition defintion:stacksRegistered){
list.add(setContent(new ItemStack(this).setStackDisplayName(defintion.getName()+" x"+1),new cElementalInstanceStackMap(new cElementalInstanceStack(defintion,1))));
list.add(setContent(new ItemStack(this).setStackDisplayName(defintion.getName()+" x"+144),new cElementalInstanceStackMap(new cElementalInstanceStack(defintion,144))));
list.add(setContent(new ItemStack(this).setStackDisplayName(defintion.getName()+" x"+1000),new cElementalInstanceStackMap(new cElementalInstanceStack(defintion,1000))));
}
}
+
+ @Override
+ public String getSymbol(ItemStack aStack, int index) {
+ try {
+ NBTTagCompound tNBT = aStack.getTagCompound();
+ if (tNBT != null && tNBT.hasKey("symbols")) {
+ String[] strings=Util.infoFromNBT(tNBT.getCompoundTag("symbols"));
+ return strings[index%strings.length];
+ } else {
+ return null;
+ }
+ } catch (Exception e) {
+ return "#!";
+ }
+ }
+
+ @Override
+ public FontRenderer getFontRenderer(ItemStack stack) {
+ return (FontRenderer) (Object) TecTechFontRender.INSTANCE;
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java
index e774704f46..8de3d1540c 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java
@@ -1,10 +1,13 @@
package com.github.technus.tectech.thing.item;
import com.github.technus.tectech.CommonValues;
+import com.github.technus.tectech.font.TecTechFontRender;
import com.github.technus.tectech.Util;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDefinitionStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException;
+import com.github.technus.tectech.thing.item.renderElemental.IElementalItem;
import cpw.mods.fml.common.registry.GameRegistry;
+import net.minecraft.client.gui.FontRenderer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@@ -20,7 +23,7 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
/**
* Created by Tec on 15.03.2017.
*/
-public final class ElementalDefinitionContainer_EM extends Item {
+public final class ElementalDefinitionContainer_EM extends Item implements IElementalItem {
public static ElementalDefinitionContainer_EM INSTANCE;
private ElementalDefinitionContainer_EM() {
@@ -49,6 +52,7 @@ public final class ElementalDefinitionContainer_EM extends Item {
}
tNBT.setTag("info", definitions.getInfoNBT());
tNBT.setTag("content", definitions.toNBT());
+ tNBT.setTag("symbols",definitions.getShortSymbolsNBT());
return oldMap;
}
return null;
@@ -91,6 +95,7 @@ public final class ElementalDefinitionContainer_EM extends Item {
}
tNBT.removeTag("info");
tNBT.removeTag("content");
+ tNBT.removeTag("symbols");
return oldMap;
}
return null;
@@ -123,4 +128,24 @@ public final class ElementalDefinitionContainer_EM extends Item {
that.setTagCompound(new NBTTagCompound());
list.add(that);
}
+
+ @Override
+ public String getSymbol(ItemStack aStack, int index) {
+ try {
+ NBTTagCompound tNBT = aStack.getTagCompound();
+ if (tNBT != null && tNBT.hasKey("symbols")) {
+ String[] strings=Util.infoFromNBT(tNBT.getCompoundTag("symbols"));
+ return strings[index%strings.length];
+ } else {
+ return null;
+ }
+ } catch (Exception e) {
+ return "#!";
+ }
+ }
+
+ @Override
+ public FontRenderer getFontRenderer(ItemStack stack) {
+ return (FontRenderer) (Object) TecTechFontRender.INSTANCE;
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java
index 97371e2449..564209062a 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java
@@ -2,13 +2,16 @@ package com.github.technus.tectech.thing.item;
import com.github.technus.tectech.CommonValues;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.font.TecTechFontRender;
import com.github.technus.tectech.Util;
import com.github.technus.tectech.loader.gui.ModGuiHandler;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.thing.CustomItemList;
+import com.github.technus.tectech.thing.item.renderElemental.IElementalItem;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -26,7 +29,7 @@ import static com.github.technus.tectech.Reference.MODID;
/**
* Created by Tec on 15.03.2017.
*/
-public final class ElementalDefinitionScanStorage_EM extends Item {
+public final class ElementalDefinitionScanStorage_EM extends Item implements IElementalItem {
public static ElementalDefinitionScanStorage_EM INSTANCE;
public static IIcon offline, online;
@@ -43,6 +46,7 @@ public final class ElementalDefinitionScanStorage_EM extends Item {
containerItem.stackTagCompound = new NBTTagCompound();
}
containerItem.stackTagCompound.setTag("elementalInfo", definitions.getScanInfoNBT(detailsOnDepthLevels));
+ containerItem.stackTagCompound.setTag("symbols",definitions.getScanShortSymbolsNBT(detailsOnDepthLevels));
}
}
@@ -128,4 +132,24 @@ public final class ElementalDefinitionScanStorage_EM extends Item {
}
return itemStack;
}
+
+ @Override
+ public String getSymbol(ItemStack aStack, int index) {
+ try {
+ NBTTagCompound tNBT = aStack.getTagCompound();
+ if (tNBT != null && tNBT.hasKey("symbols")) {
+ String[] strings=Util.infoFromNBT(tNBT.getCompoundTag("symbols"));
+ return strings[index%strings.length];
+ } else {
+ return null;
+ }
+ } catch (Exception e) {
+ return "#!";
+ }
+ }
+
+ @Override
+ public FontRenderer getFontRenderer(ItemStack stack) {
+ return (FontRenderer) (Object) TecTechFontRender.INSTANCE;
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java b/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java
index 7f4c9b64fe..20f59b56e2 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java
@@ -1,6 +1,7 @@
package com.github.technus.tectech.thing.item.gui;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.font.TecTechFontRender;
import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@@ -57,33 +58,33 @@ public class ScanDisplayScreen extends GuiScreen {
for(int i=firstLine-1, j=8;i>=0 && j!=0;i--,j/=2){
int equalPos=lines[i].indexOf('=');
if(equalPos>=0){
- TecTech.proxy.renderUnicodeString(lines[i].substring(0,equalPos), textBaseX, textBaseY - 8 + j, 200, itick);
- TecTech.proxy.renderUnicodeString(lines[i].substring(equalPos), textBaseXX, textBaseY - 8 + j, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i].substring(0,equalPos), textBaseX, textBaseY - 8 + j, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i].substring(equalPos), textBaseXX, textBaseY - 8 + j, 200, itick);
}else {
- TecTech.proxy.renderUnicodeString(lines[i], textBaseX, textBaseY - 8 + j, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i], textBaseX, textBaseY - 8 + j, 200, itick);
}
}
for(int i = firstLine, j = 0; i<lines.length && j< renderedLines; i++,j++){
textBaseY += 9;
int equalPos=lines[i].indexOf('=');
if(equalPos>=0){
- TecTech.proxy.renderUnicodeString(lines[i].substring(0,equalPos), textBaseX, textBaseY, 200, itick);
- TecTech.proxy.renderUnicodeString(lines[i].substring(equalPos), textBaseXX, textBaseY, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i].substring(0,equalPos), textBaseX, textBaseY, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i].substring(equalPos), textBaseXX, textBaseY, 200, itick);
}else {
- TecTech.proxy.renderUnicodeString(lines[i], textBaseX, textBaseY, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i], textBaseX, textBaseY, 200, itick);
}
}
for(int i = firstLine+ renderedLines, j = 8; i<lines.length && j!=0; i++,j/=2){
int equalPos=lines[i].indexOf('=');
if(equalPos>=0){
- TecTech.proxy.renderUnicodeString(lines[i].substring(0,equalPos), textBaseX, textBaseY + 17 - j, 200, itick);
- TecTech.proxy.renderUnicodeString(lines[i].substring(equalPos), textBaseXX, textBaseY + 17 - j, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i].substring(0,equalPos), textBaseX, textBaseY + 17 - j, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i].substring(equalPos), textBaseXX, textBaseY + 17 - j, 200, itick);
}else {
- TecTech.proxy.renderUnicodeString(lines[i], textBaseX, textBaseY + 17 - j, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(lines[i], textBaseX, textBaseY + 17 - j, 200, itick);
}
}
- TecTech.proxy.renderUnicodeString(Integer.toString(firstLine), textBaseX, baseY+146, 200, itick);
- TecTech.proxy.renderUnicodeString(Integer.toString(lines.length), textBaseX, baseY+157, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(Integer.toString(firstLine), textBaseX, baseY+146, 200, itick);
+ TecTechFontRender.INSTANCE.drawSplitString(Integer.toString(lines.length), textBaseX, baseY+157, 200, itick);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/item/renderElemental/IElementalItem.java b/src/main/java/com/github/technus/tectech/thing/item/renderElemental/IElementalItem.java
new file mode 100644
index 0000000000..ab68691eaa
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/thing/item/renderElemental/IElementalItem.java
@@ -0,0 +1,7 @@
+package com.github.technus.tectech.thing.item.renderElemental;
+
+import net.minecraft.item.ItemStack;
+
+public interface IElementalItem {
+ String getSymbol(ItemStack stack,int index);
+}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java b/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java
new file mode 100644
index 0000000000..bfb1a188d8
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java
@@ -0,0 +1,74 @@
+package com.github.technus.tectech.thing.item.renderElemental;
+
+import com.github.technus.tectech.font.TecTechFontRender;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.client.IItemRenderer;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class RenderElementalName implements IItemRenderer {
+ public static final RenderElementalName INSTANCE=new RenderElementalName();
+
+ public boolean handleRenderType(final ItemStack itemStack, final IItemRenderer.ItemRenderType type) {
+ return type == ItemRenderType.INVENTORY;
+ }
+
+ public boolean shouldUseRenderHelper(final IItemRenderer.ItemRenderType type, final ItemStack itemStack, final IItemRenderer.ItemRendererHelper helper) {
+ return false;
+ }
+
+ public void renderItem(final IItemRenderer.ItemRenderType type, final ItemStack itemStack, final Object... data) {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPushMatrix();
+ Item item = itemStack.getItem();
+ final Tessellator tessellator = Tessellator.instance;
+ for (int i = 0; i < item.getRenderPasses(itemStack.getItemDamage()); i++) {
+ IIcon icon = item.getIcon(itemStack, i);
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV(0.0, 0.0, 0.0, (double)icon.getMinU(), (double)icon.getMinV());
+ tessellator.addVertexWithUV(0.0, 16, 0.0, (double)icon.getMinU(), (double)icon.getMaxV());
+ tessellator.addVertexWithUV(16, 16, 0.0, (double)icon.getMaxU(), (double)icon.getMaxV());
+ tessellator.addVertexWithUV(16, 0.0, 0.0, (double)icon.getMaxU(), (double)icon.getMinV());
+ tessellator.draw();
+ //ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625f);
+ }
+ String sym=((IElementalItem)item).getSymbol(itemStack,(int)(System.currentTimeMillis()/1000));
+ if(sym!=null){
+ if(sym.length()>4){
+ sym="...";
+ }
+
+ GL11.glPushMatrix();
+ GL11.glTranslatef(.8F,.8F,0F);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glTranslatef(-1.6f,0,0);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glTranslatef(0,-1.6f,0);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glTranslatef(0,1.6f,0);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glTranslatef(.4F,.4F,0F);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glTranslatef(-.8f,0,0);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glTranslatef(0,-.8f,0);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glTranslatef(0,.8f,0);
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0x222200);
+ GL11.glPopMatrix();
+
+ TecTechFontRender.INSTANCE.drawSplitString(sym, 0, 0, 16, 0xffff00);
+ }
+ GL11.glPopMatrix();
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java
index 015c3742cd..bf63eaa24f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java
@@ -1,5 +1,6 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch.gui;
+import com.github.technus.tectech.font.TecTechFontRender;
import com.github.technus.tectech.Util;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import java.util.Locale;
-import static com.github.technus.tectech.TecTech.proxy;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
public class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine {
@@ -19,19 +19,19 @@ public class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine {
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
if (mContainer != null) {
- proxy.renderUnicodeString("Parameters: " + ((GT_Container_Param) mContainer).param, 46, 7, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Parameters: " + ((GT_Container_Param) mContainer).param, 46, 7, 167, 0xffffff);
Locale locale= Locale.getDefault();
- proxy.renderUnicodeString("\u24EA\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input0f), 46, 16, 167, 0x22ddff);
- proxy.renderUnicodeString("\u2460\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input1f), 46, 24, 167, 0x00ffff);
- proxy.renderUnicodeString("\u24EA\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value0f), 46, 33, 167, 0x00bbff);
- proxy.renderUnicodeString("\u2460\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value1f), 46, 41, 167, 0x0077ff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input0f), 46, 16, 167, 0x22ddff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input1f), 46, 24, 167, 0x00ffff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value0f), 46, 33, 167, 0x00bbff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value1f), 46, 41, 167, 0x0077ff);
GL11.glPushMatrix();
GL11.glScalef(.5f,.5f,.5f);
- proxy.renderUnicodeString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value0f)), 92, 100, 334, 0x00bbff);
- proxy.renderUnicodeString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value1f)), 92, 116, 334, 0x0077ff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value0f)), 92, 100, 334, 0x00bbff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value1f)), 92, 116, 334, 0x0077ff);
GL11.glPopMatrix();
} else {
- proxy.renderUnicodeString("Parameters", 46, 7, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Parameters", 46, 7, 167, 0xffffff);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java
index 5e83290450..a682323f8c 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java
@@ -1,5 +1,6 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch.gui;
+import com.github.technus.tectech.font.TecTechFontRender;
import com.github.technus.tectech.Util;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import java.util.Locale;
-import static com.github.technus.tectech.TecTech.proxy;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
public class GT_GUIContainer_ParamAdv extends GT_GUIContainerMetaTile_Machine {
@@ -19,20 +19,20 @@ public class GT_GUIContainer_ParamAdv extends GT_GUIContainerMetaTile_Machine {
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
if (mContainer != null) {
- proxy.renderUnicodeString("Parameters X: " + ((GT_Container_ParamAdv) mContainer).param, 46, 7, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Parameters X: " + ((GT_Container_ParamAdv) mContainer).param, 46, 7, 167, 0xffffff);
Locale locale = Locale.getDefault();
- proxy.renderUnicodeString("\u24EA\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input0f)), 46, 16, 167, 0x22ddff);
- proxy.renderUnicodeString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input1f)), 46, 24, 167, 0x00ffff);
- proxy.renderUnicodeString("\u24EA\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value0f)), 46, 33, 167, 0x00bbff);
- proxy.renderUnicodeString("\u2460\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value1f)), 46, 41, 167, 0x0077ff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input0f)), 46, 16, 167, 0x22ddff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input1f)), 46, 24, 167, 0x00ffff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value0f)), 46, 33, 167, 0x00bbff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value1f)), 46, 41, 167, 0x0077ff);
GL11.glPushMatrix();
GL11.glScalef(.5f,.5f,.5f);
- proxy.renderUnicodeString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value0f)), 92, 100, 334, 0x00bbff);
- proxy.renderUnicodeString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value1f)), 92, 116, 334, 0x0077ff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value0f)), 92, 100, 334, 0x00bbff);
+ TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value1f)), 92, 116, 334, 0x0077ff);
GL11.glPopMatrix();
- proxy.renderUnicodeString("Pointer " + Integer.toHexString(((GT_Container_ParamAdv) mContainer).pointer | 0x10000).substring(1), 46, 66, 167, 0x0033ff);
+ TecTechFontRender.INSTANCE.drawSplitString("Pointer " + Integer.toHexString(((GT_Container_ParamAdv) mContainer).pointer | 0x10000).substring(1), 46, 66, 167, 0x0033ff);
} else {
- proxy.renderUnicodeString("Parameters X", 46, 7, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Parameters X", 46, 7, 167, 0xffffff);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Uncertainty.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Uncertainty.java
index e003774f13..7d7dc1b656 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Uncertainty.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Uncertainty.java
@@ -1,12 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch.gui;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.font.TecTechFontRender;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
import org.lwjgl.opengl.GL11;
-import static com.github.technus.tectech.TecTech.proxy;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
public class GT_GUIContainer_Uncertainty extends GT_GUIContainerMetaTile_Machine {
@@ -16,11 +16,11 @@ public class GT_GUIContainer_Uncertainty extends GT_GUIContainerMetaTile_Machine
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- proxy.renderUnicodeString("Schr\u00F6dinger", 46, 7, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Schr\u00F6dinger", 46, 7, 167, 0xffffff);
if (mContainer != null && ((GT_Container_Uncertainty) mContainer).status == 0) {
- proxy.renderUnicodeString("Status: OK", 46, 16, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Status: OK", 46, 16, 167, 0xffffff);
} else {
- proxy.renderUnicodeString("Status: NG", 46, 16, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Status: NG", 46, 16, 167, 0xffffff);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java
index b327424937..51eaf64ce4 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java
@@ -1,10 +1,10 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch.gui;
+import com.github.technus.tectech.font.TecTechFontRender;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
-import static com.github.technus.tectech.TecTech.proxy;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import static org.lwjgl.opengl.GL11.*;
@@ -17,11 +17,11 @@ public class GT_GUIContainer_UncertaintyAdv extends GT_GUIContainerMetaTile_Mach
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- proxy.renderUnicodeString("Schr\u00F6dinger X", 46, 7, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Schr\u00F6dinger X", 46, 7, 167, 0xffffff);
if (mContainer != null && ((GT_Container_Uncertainty) mContainer).status == 0) {
- proxy.renderUnicodeString("Status: OK", 46, 16, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Status: OK", 46, 16, 167, 0xffffff);
} else {
- proxy.renderUnicodeString("Status: NG", 46, 16, 167, 0xffffff);
+ TecTechFontRender.INSTANCE.drawSplitString("Status: NG", 46, 16, 167, 0xffffff);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
index 166ab90ff1..1dc80606d9 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
@@ -8,8 +8,8 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInsta
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalMutableDefinitionStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
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.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.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
index d379502540..011105356a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
@@ -27,8 +27,8 @@ import java.util.ArrayList;
import static com.github.technus.tectech.CommonValues.V;
import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME;
-import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.refMass;
-import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.refUnstableMass;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index 1d3d40666f..c48c9e69de 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
@@ -34,8 +34,8 @@ import static com.github.technus.tectech.Util.isInputEqual;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.DEFAULT_ENERGY_LEVEL;
import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME;
-import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.refMass;
-import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.refUnstableMass;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java
index 56f535f32a..ef8c0e7c3d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java
@@ -3,7 +3,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.em_machine;
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.atom.dAtomDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.MultiblockControl;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java
index 6d95900af0..4b1c5f3cf6 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java
@@ -3,7 +3,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.em_machine;
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.atom.dAtomDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.MultiblockControl;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;