aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java22
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java22
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderLinkTag.java15
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderWorldSavedData.java3
-rw-r--r--src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java78
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java23
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java28
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java21
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java22
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java25
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java23
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java22
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java23
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java20
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java24
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java24
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java27
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java24
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java18
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java25
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java20
26 files changed, 377 insertions, 227 deletions
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
index 2a9f7ec6d2..d8eb7d69dc 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
@@ -13,6 +13,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -139,12 +140,21 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
}
@Override
- public String[] getDescription() {
- return new String[]{
- CommonValues.TEC_MARK_EM,
- translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.0"),//Transform quantum form back to...
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.1")//regular one, but why?
- };
+ public GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.name")) // Machine Type: Essentia Dequantizer
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.0")) // Controller block of the Essentia Dequantizer
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.1")) // Transforms elemental matter back into essentia
+ .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex!
+ .addSeparator()
+ .beginStructureBlock(3, 3, 5, false)
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.ElementalInput"), translateToLocal("tt.keyword.Structure.BackCenter"), 2) // Elemental Input Hatch: Back center
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.ElementalOverflow"), translateToLocal("tt.keyword.Structure.AnyOuterMolecularCasing4th"), 3) // Elemental Overflow Hatch: Any outer Molecular Casing on the 4th slice
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.EssentiaStorage"), translateToLocal("tt.keyword.Structure.AnyHighPowerCasingFront"), 1) // Essentia Storage: Any High Power Casing on the front side
+ .addEnergyHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasingFront"), 1) // Energy Hatch: Any High Power Casing on the front side
+ .addMaintenanceHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasingFront"), 1) // Maintenance Hatch: Any High Power Casing on the front side
+ .toolTipFinisher(CommonValues.TEC_MARK_EM);
+ return tt;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
index befc9ac77e..a151c2becf 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
@@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
@@ -113,12 +114,21 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
}
@Override
- public String[] getDescription() {
- return new String[]{
- CommonValues.TEC_MARK_EM,
- translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0"),//Conveniently convert regular stuff into quantum form.
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")//To make it more inconvenient.
- };
+ public GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.name")) // Machine Type: Essentia Quantizer
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0")) // Controller block of the Essentia Quantizer
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")) // Transforms essentia into their elemental form
+ .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex!
+ .addSeparator()
+ .beginStructureBlock(3, 3, 5, false)
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.ElementalOutput"), translateToLocal("tt.keyword.Structure.BackCenter"), 2) // Elemental Output Hatch: Back center
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.ElementalOverflow"), translateToLocal("tt.keyword.Structure.AnyOuterMolecularCasing4th"), 3) // Elemental Overflow Hatch: Any outer Molecular Casing on the 4th slice
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.EssentiaStorage"), translateToLocal("tt.keyword.Structure.AnyHighPowerCasingFront"), 1) // Essentia Storage: Any High Power Casing on the front side
+ .addEnergyHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasingFront"), 1) // Energy Hatch: Any High Power Casing on the front side
+ .addMaintenanceHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasingFront"), 1) // Maintenance Hatch: Any High Power Casing on the front side
+ .toolTipFinisher(CommonValues.TEC_MARK_EM);
+ return tt;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderLinkTag.java b/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderLinkTag.java
index 3d7b7a20b8..60e0acdb1d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderLinkTag.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderLinkTag.java
@@ -2,22 +2,19 @@ package com.github.technus.tectech.mechanics.enderStorage;
import com.google.common.base.Objects;
-import java.awt.*;
import java.io.Serializable;
import java.util.UUID;
public class EnderLinkTag implements Serializable {
- private final Color color;
+ private final String frequency;
private final UUID player;
- public EnderLinkTag(Color color, UUID player) {
- this.color = color;
+ public EnderLinkTag(String frequency, UUID player) {
+ this.frequency = frequency;
this.player = player;
}
- public int getColorInt() {
- return color.getRGB();
- }
+ public String getFrequency() { return frequency; }
public UUID getUUID() {
return player;
@@ -28,12 +25,12 @@ public class EnderLinkTag implements Serializable {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EnderLinkTag that = (EnderLinkTag) o;
- return Objects.equal(color, that.color) &&
+ return Objects.equal(frequency, that.frequency) &&
Objects.equal(player, that.player);
}
@Override
public int hashCode() {
- return Objects.hashCode(color, player);
+ return Objects.hashCode(frequency, player);
}
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderWorldSavedData.java b/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderWorldSavedData.java
index 6afa3a494f..d0503aa45c 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderWorldSavedData.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/enderStorage/EnderWorldSavedData.java
@@ -6,7 +6,6 @@ import net.minecraft.world.storage.MapStorage;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fluids.IFluidHandler;
-import java.awt.*;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
@@ -19,7 +18,7 @@ public class EnderWorldSavedData extends WorldSavedData {
private static final String DATA_NAME = MODID + "_EnderWorldSavedData";
private static final String ENDER_LIQUID_TAG_LINK = DATA_NAME + "_EnderLiquidTagLink";
private static final String ENDER_LIQUID_TANK_LINK = DATA_NAME + "_EnderLiquidTankLink";
- private static final EnderLinkTag DEFAULT_LINK_TAG = new EnderLinkTag(Color.WHITE, null);
+ private static final EnderLinkTag DEFAULT_LINK_TAG = new EnderLinkTag("", null);
private Map<EnderLinkTag, EnderFluidContainer> EnderLiquidTagLink = new HashMap<>();
private Map<EnderLinkTank, EnderLinkTag> EnderLiquidTankLink = new HashMap<>();
diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java
index 92855499d9..e5e62ae4d8 100644
--- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java
+++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java
@@ -3,7 +3,6 @@ package com.github.technus.tectech.thing.cover;
import com.github.technus.tectech.loader.NetworkDispatcher;
import com.github.technus.tectech.mechanics.enderStorage.EnderLinkCoverMessage;
import com.github.technus.tectech.mechanics.enderStorage.EnderLinkTag;
-import com.github.technus.tectech.util.TT_Utility;
import eu.usrv.yamcore.auxiliary.PlayerChatHelper;
import gregtech.api.enums.GT_Values;
import gregtech.api.gui.GT_GUICover;
@@ -22,7 +21,6 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
-import java.awt.*;
import java.util.UUID;
import static com.github.technus.tectech.mechanics.enderStorage.EnderWorldSavedData.getEnderFluidContainer;
@@ -33,7 +31,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
private static final int L_PER_TICK = 8000;
private final static int IMPORT_EXPORT_MASK = 0b0001;
private final static int PUBLIC_PRIVATE_MASK = 0b0010;
- private static EnderLinkTag tag = new EnderLinkTag(Color.WHITE, null);//Client-Sided
+ private static EnderLinkTag tag = new EnderLinkTag("", null);//Client-Sided
public GT_Cover_TM_EnderFluidLink() {
}
@@ -133,7 +131,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
private final byte side;
private final int coverID;
private int coverVariable;
- private GT_GuiIntegerHexTextBox colorField;
+ private GT_GuiTextBox colorField;
private final static int START_X = 10;
private final static int START_Y = 25;
@@ -146,7 +144,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
private final static int BOX_SIZE_X = 34;
private final static int BOX_SIZE_Y = 34;
- private final static int TEXT_FIELD_SIZE_X = 72;
+ private final static int TEXT_FIELD_SIZE_X = SPACE_X * 5 - 8;
private final static int TEXT_FIELD_SIZE_Y = 12;
private final static int TEXT_STRING_LENGTH = 9;
@@ -163,8 +161,8 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
return new GT_GuiIconButton(this, id, START_X + SPACE_X * x, START_Y + SPACE_Y * y, icon);
}
- private GT_GuiIntegerHexTextBox newTextField(int id, int x, int y) {
- GT_GuiIntegerHexTextBox field = new GT_GuiIntegerHexTextBox(this, id, START_X + SPACE_X * x,
+ private GT_GuiTextBox newTextField(int id, int x, int y) {
+ GT_GuiTextBox field = new GT_GuiTextBox(this, id, START_X + SPACE_X * x,
START_Y + SPACE_Y * y, TEXT_FIELD_SIZE_X, TEXT_FIELD_SIZE_Y);
field.setMaxStringLength(TEXT_STRING_LENGTH);
return field;
@@ -175,45 +173,6 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
return fontRendererObj.drawString(text, START_X + SPACE_X * x, align + START_Y + SPACE_Y * y, FONT_COLOR);
}
- private void drawColorSquare(int x, int y) {
- //Draw the border square
- int borderX1 = START_X + SPACE_X * x;
- int borderY1 = START_Y + SPACE_Y * y;
- int borderX2 = borderX1 + BOX_SIZE_X;
- int borderY2 = borderY1 + BOX_SIZE_Y;
- drawRect(borderX1, borderY1, borderX2, borderY2, BOX_BORDER_COLOR);
-
- //Draw Checkerboard Pattern
- int white = 0xFFFFFFFF;
- int grey = 0xFFBFBFBF;
- boolean whiteOrGrey = true;
- int cGridXStart = borderX1 + 1;
- int cGridYStart = borderY1 + 1;
- int cGridXToDraw = 4;
- int cGridYToDraw = 4;
- int cSquareWidth = 8;
- int cSquareHeight = 8;
- for (int i = 0; i < cGridXToDraw; i++) {
- for (int j = 0; j < cGridYToDraw; j++) {
- int cBoxX1 = cGridXStart + (cSquareWidth * i);
- int cBoxY1 = cGridYStart + (cSquareHeight * j);
- int cBoxX2 = cBoxX1 + cSquareWidth;
- int cBoxY2 = cBoxY1 + cSquareHeight;
- int cBoxColor = whiteOrGrey ? white : grey;
- drawRect(cBoxX1, cBoxY1, cBoxX2, cBoxY2, cBoxColor);
- whiteOrGrey = !whiteOrGrey;
- }
- whiteOrGrey = !whiteOrGrey;
- }
-
- //Draw the actual color
- int insideX1 = borderX1 + 1;
- int insideY1 = borderY1 + 1;
- int insideX2 = borderX2 - 1;
- int insideY2 = borderY2 - 1;
- drawRect(insideX1, insideY1, insideX2, insideY2, tag.getColorInt());
- }
-
public TM_EnderFluidLinkCover(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, SIZE_X, SIZE_Y, GT_Utility.intToStack(aCoverID));
side = aSide;
@@ -221,7 +180,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
coverVariable = aCoverVariable;
NetworkDispatcher.INSTANCE.sendToServer(new EnderLinkCoverMessage.EnderLinkCoverQuery(tag, (IFluidHandler) tile));
//Color Value Field
- colorField = newTextField(COLOR_FIELD_ID, 2, 1);
+ colorField = newTextField(COLOR_FIELD_ID, 0, 0);
GUI_INSTANCE = this;
resetColorField();
//Public/Private Buttons
@@ -239,8 +198,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
@Override
public void drawExtras(int mouseX, int mouseY, float parTicks) {
super.drawExtras(mouseX, mouseY, parTicks);
- drawColorSquare(0, 0);
- drawNewString(trans("328", "Color Value"), 2, 0);
+ drawNewString(trans("328", "Channel"), 5, 0);
drawNewString(trans("329", "Public/Private"), 2, 2);
drawNewString(trans("229", "Import/Export"), 2, 3);
}
@@ -274,7 +232,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
} else {
ownerUUID = null;
}
- EnderLinkTag newTag = new EnderLinkTag(new Color(tag.getColorInt(), true), ownerUUID);
+ EnderLinkTag newTag = new EnderLinkTag(tag.getFrequency(), ownerUUID);
NetworkDispatcher.INSTANCE.sendToServer(new EnderLinkCoverMessage.EnderLinkCoverUpdate(newTag, (IFluidHandler) tile));
}
@@ -313,8 +271,7 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
public void applyTextBox(GT_GuiIntegerTextBox box) {
try {
String string = box.getText();
- int colorValue = (int) Long.parseLong(string.replaceFirst("#", ""), 16);
- tag = new EnderLinkTag(new Color(colorValue, true), tag.getUUID());
+ tag = new EnderLinkTag(string, tag.getUUID());
NetworkDispatcher.INSTANCE.sendToServer(new EnderLinkCoverMessage.EnderLinkCoverUpdate(tag, (IFluidHandler) tile));
} catch (NumberFormatException ignored) {
}
@@ -323,30 +280,21 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
@Override
public void resetTextBox(GT_GuiIntegerTextBox box) {
- //Solid White becomes: #FFFFFFFF
- box.setText("#" + TT_Utility.formatNumberIntHex(tag.getColorInt()));
+ box.setText(tag.getFrequency());
}
public void resetColorField() {
resetTextBox(colorField);
}
- private class GT_GuiIntegerHexTextBox extends GT_GuiIntegerTextBox {
- public GT_GuiIntegerHexTextBox(IGuiScreen gui, int id, int x, int y, int width, int height) {
+ private class GT_GuiTextBox extends GT_GuiIntegerTextBox {
+ public GT_GuiTextBox(IGuiScreen gui, int id, int x, int y, int width, int height) {
super(gui, id, x, y, width, height);
}
@Override
public boolean validChar(char c, int key) {
- boolean isValid;
- if (getCursorPosition() == 0) {
- isValid = c == '#';
- } else {
- isValid = super.validChar(c, key)
- || c == 'A' || c == 'B' || c == 'C' || c == 'D' || c == 'E' || c == 'F'
- || c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f';
- }
- return isValid;
+ return true;
}
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
index 8a51494b94..a2996de081 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
@@ -12,6 +12,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -84,12 +85,18 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
}
@Override
- public String[] getDescription() {
- return new String[]{
- CommonValues.TEC_MARK_EM,
- translateToLocal("gt.blockmachines.multimachine.em.annihilation.desc.0"),//Things+Anti Things don't like each other.
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.annihilation.desc.1")//Matter into power!
- };
+ public GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.annihilation.name")) // Machine Type: Annihilation Generator
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.annihilation.desc.0")) // Controller block of the Annihilation Generator
+ .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex!
+ .addSeparator()
+ .beginStructureBlock(11, 11, 11, false)
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.Elemental"), translateToLocal("tt.keyword.Structure.AnyMolecularCasing"), 1) // Elemental Hatch: Any Molecular Casing
+ .addEnergyHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasing"), 1) // Energy Hatch: Any High Power Casing
+ .addMaintenanceHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasing"), 1) // Maintenance Hatch: Any High Power Casing
+ .toolTipFinisher(CommonValues.TEC_MARK_EM);
+ return tt;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
index 3d6bb58cb0..c0174ad510 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
@@ -12,6 +12,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -279,12 +280,18 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
}
@Override
- public String[] getDescription() {
- return new String[]{
- CommonValues.TEC_MARK_EM,
- translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.desc.0"),//Singularity based power generation.
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.desc.1")//Super unstable!!!
- };
+ public GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.name")) // Machine Type: Black Hole Generator
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.desc.0")) // Controller block of the Black Hole Generator
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.desc.1")) // Uses a black hole to generate power
+ .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex!
+ .addSeparator()
+ .beginStructureBlock(33, 33, 33, false)
+ .addEnergyHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasing1D"), 1) // Energy Hatch: Any High Power Casing with 1 dot
+ .addMaintenanceHatch(translateToLocal("tt.keyword.Structure.AnyHighPowerCasing1D"), 1) // Maintenance Hatch: Any High Power Casing with 1 dot
+ .toolTipFinisher(CommonValues.TEC_MARK_EM);
+ return tt;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index 3f8e9170de..16fcf2618c 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -21,6 +21,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -292,12 +293,22 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
}
@Override
- public String[] getDescription() {
- return new String[]{
- CommonValues.TEC_MARK_EM,
- TT_Utility.intBitsToString(TecTech.RANDOM.nextInt()),
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above
- };
+ public GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.computer.name")) // Machine Type: Quantum Computer
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.computer.desc.0")) // Controller block of the Quantum Computer
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.computer.desc.1")) // Used to generate computation (and heat)
+ .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex!
+ .addSeparator()
+ .beginVariableStructureBlock(2, 2, 4, 4, 5, 16, false)
+ .addOtherStructurePart(translateToLocal("gt.blockmachines.hatch.certain.tier.07.name"), translateToLocal("tt.keyword.Structure.AnyComputerCasingFirstOrLastSlice"), 1) // Uncertainty Resolver: Any Computer Casing on first or last slice
+ .addOtherStructurePart(translateToLocal("tt.keyword.Structure.DataConnector"), translateToLocal("tt.keyword.Structure.AnyComputerCasingFirstOrLastSlice"), 1) // Optical Connector: Any Computer Casing on first or last slice
+ .addOtherStructurePart(translateToLocal("gt.blockmachines.hatch.rack.tier.08.name"), translateToLocal("tt.keyword.Structure.AnyAdvComputerCasingExceptOuter"), 2) // Computer Rack: Any Advanced Computer Casing, except the outer ones
+ .addOtherStructurePart(translateToLocal("gt.blockmachines.hatch.param.tier.05.name"), translateToLocal ("tt.keyword.Structure.Optional") + " " + translateToLocal("tt.keyword.Structure.AnyComputerCasingFirstOrLastSlice"), 2) // Parametrizer: (optional) Any Computer Casing on first or last slice
+ .addEnergyHatch(translateToLocal("tt.keyword.Structure.AnyComputerCasingFirstOrLastSlice"), 1) // Energy Hatch: Any Computer Casing on first or last slice
+ .addMaintenanceHatch(translateToLocal("tt.keyword.Structure.AnyComputerCasingFirstOrLastSlice"), 1) // Maintenance Hatch: Any Computer Casing on first or last slice
+ .toolTipFinisher(CommonValues.TEC_MARK_EM);
+ return tt;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
index 014e2b3a65..822e6d6ddf 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
@@ -12,6 +12,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -89,12 +90,18 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
}
@Override
- public String[] getDescription() {
- return new String[]{
- CommonValues.TEC_MARK_EM,
- translateToLocal("gt.blockmachines.multimachine.em.crafter.desc.0"),//The most precise way of making stuff.
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.crafter.desc.1")//
- };
+ public GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.crafter.name")) // Machine Type: Matter Assembler
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.crafter.desc.0")) // Controller block of the Matter Assembler
+ .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The str