aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java116
1 files changed, 104 insertions, 12 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index 2bea7473cc..0556a7f4fe 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -20,6 +20,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.fluids.FluidStack;
import gregtech.GT_Mod;
@@ -50,6 +51,7 @@ public class Meta_GT_Proxy {
static {
instance = new Meta_GT_Proxy();
+ Logger.INFO("GT_PROXY - initialized.");
}
public static final Meta_GT_Proxy instance;
@@ -69,7 +71,7 @@ public class Meta_GT_Proxy {
public static IIconRegister sBlockIcons, sItemIcons;
public Meta_GT_Proxy() {
- Logger.INFO("GT_PROXY - initialized.");
+
}
public static Block sBlockMachines;
@@ -77,7 +79,7 @@ public class Meta_GT_Proxy {
public void preInit() {
//New GT++ Block, yay! (Progress)
- sBlockMachines = new GTPP_Block_Machines();
+ //sBlockMachines = new GTPP_Block_Machines();
GT_Log.out.println("GT++ Mod: Register TileEntities.");
BaseMetaTileEntity tBaseMetaTileEntity = constructBaseMetaTileEntity();
@@ -103,6 +105,15 @@ public class Meta_GT_Proxy {
}
+ public static TileEntity constructCustomGregtechMetaTileEntityByMeta(int aMeta) {
+ if (aMeta == 12) {
+ return Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower();
+ }
+ else {
+ return Meta_GT_Proxy.constructBaseMetaTileEntity();
+ }
+ }
+
public static BaseCustomTileEntity constructBaseMetaTileEntity() {
if (sBaseMetaTileEntityClass == null) {
try {
@@ -307,7 +318,74 @@ public class Meta_GT_Proxy {
}else i++;
}
}
- if (tTileEntity.getEUCapacity() > 0L) {
+
+
+
+ if (tTileEntity.getEUCapacity() > 0L) {
+
+ final long tVoltage = tTileEntity.getInputVoltage();
+ byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage)));
+
+ //Custom handling
+ if (tDamage < 30500 && tDamage >= 30400) {
+ int aOffset = tDamage - 30400;
+ if ((aOffset) <= 10) {
+ tTier -= 2;
+ aList.add(EnumChatFormatting.BOLD+"16"+" Fuse Slots"+EnumChatFormatting.GRAY);
+ aList.add("Per each fuse, you may insert "+EnumChatFormatting.YELLOW+(GT_Values.V[tTier])+EnumChatFormatting.GRAY+" EU/t");
+ aList.add("However this "+EnumChatFormatting.ITALIC+EnumChatFormatting.RED+"MUST"+EnumChatFormatting.GRAY+" be in a single Amp");
+ aList.add("This machine can accept upto a single amp of "+GT_Values.VN[Math.min(tTier+2, 12)]+" as a result");
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Breaker_Loss", "Breaker Loss: "+EnumChatFormatting.RED+""+(GT_Values.V[Math.max(tTier-1, 0)]/10)+EnumChatFormatting.GRAY+" EU/t", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
+ }
+
+
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Special_Power_1", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
+ //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
+ //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
+ }
+
+
+ if (tTileEntity.getInputVoltage() > 0L) {
+ String inA = "0";
+ if (tTileEntity.getInputAmperage() >= 1L) {
+ inA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getInputAmperage() + EnumChatFormatting.GRAY +" Amps";
+ }
+ else {
+ inA = " at " + EnumChatFormatting.WHITE + tTileEntity.getInputAmperage() + EnumChatFormatting.GRAY +" Amps";
+ }
+ String a1 = "Voltage IN: "+EnumChatFormatting.GREEN + tTileEntity.getInputVoltage()
+ + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")"
+ + EnumChatFormatting.GRAY + inA;
+ aList.add(a1);
+ }
+
+ if (tTileEntity.getOutputVoltage() > 0L) {
+ String outA = "0";
+ if (tTileEntity.getOutputAmperage() >= 1L) {
+ outA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps";
+ }
+ else {
+ outA = " at " + EnumChatFormatting.WHITE + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps";
+ }
+ String a1 = "Voltage OUT: "+EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage()
+ + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")"
+ + EnumChatFormatting.GRAY + outA;
+ aList.add(a1);
+ }
+
+
+ if (tTileEntity.getOutputVoltage() > 0L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Lossess_EU", "Transmission Loss: "+EnumChatFormatting.DARK_BLUE+""+(tDamage < 30500 && tDamage >= 30400 ? 0 : 1), !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
+ }
+
+ if (tTileEntity.getEUCapacity() > 0) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE2",
+ "Internal Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE
+ + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY + " EU");
+ }
+ }
+
+ /*if (tTileEntity.getEUCapacity() > 0L) {
if (tTileEntity.getInputVoltage() > 0L) {
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
}
@@ -318,7 +396,8 @@ public class Meta_GT_Proxy {
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
}
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
- }
+ }*/
+
}
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
@@ -341,15 +420,28 @@ public class Meta_GT_Proxy {
}
}
- //Add Custom Tooltips
- for (String s : mCustomGregtechMetaTooltips.keySet()) {
- if (aNBT.hasKey(s)) {
- String aTip = mCustomGregtechMetaTooltips.get(s).getTooltip(aNBT.getString(s));
- aList.add(aTip);
- }
- }
-
}
+
+ //Add Custom Here
+
+ //Add Custom Tooltips
+ for (String s : mCustomGregtechMetaTooltips.keySet()) {
+ if (aNBT.hasKey(s)) {
+ String aTip = mCustomGregtechMetaTooltips.get(s).getTooltip(aNBT.getString(s));
+ aList.add(aTip);
+ }
+ }
+
+ //Add GT++ Stuff
+
+ if (tDamage >= 30400 && tDamage < 30500) {
+ aList.add(EnumChatFormatting.UNDERLINE+"Special GT++ Machine");
+ }
+ if ((tDamage >= 750 && tDamage < 1000) || (tDamage >= 30000 && tDamage < 31000)) {
+ aList.add(CORE.GT_Tooltip);
+ }
+
+
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
}