aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-05-11 18:15:30 +0900
committerGitHub <noreply@github.com>2023-05-11 11:15:30 +0200
commitbd28732e96aed7e2c82321179486e8c4f6446a1a (patch)
treeaafffbbe20405cff24115b35588344219eb25109 /src/main/java/gtPlusPlus
parentcfce34129865348958fd9bedf0b23719f831676b (diff)
downloadGT5-Unofficial-bd28732e96aed7e2c82321179486e8c4f6446a1a.tar.gz
GT5-Unofficial-bd28732e96aed7e2c82321179486e8c4f6446a1a.tar.bz2
GT5-Unofficial-bd28732e96aed7e2c82321179486e8c4f6446a1a.zip
Remove Computer Cube MKII (#622)
Diffstat (limited to 'src/main/java/gtPlusPlus')
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java1
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java11
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java22
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java1
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java81
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java294
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java152
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java1420
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java8
12 files changed, 1 insertions, 2038 deletions
diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index 5f6a807746..eb80f46d6f 100644
--- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -274,8 +274,6 @@ public class RECIPES_Machines {
multiSolarTower();
multiElementalDuplicator();
- computerCube();
-
resonanceChambers();
modulators();
}
@@ -313,18 +311,6 @@ public class RECIPES_Machines {
MaterialUtils.getVoltageForTier(6));
}
- private static void computerCube() {
-
- CORE.RA.addSixSlotAssemblingRecipe(
- new ItemStack[] { CI.getNumberedAdvancedCircuit(20), CI.getTieredGTPPMachineCasing(4, 1),
- CI.getCircuit(4, 8), CI.getFieldGenerator(2, 4), CI.getDoublePlate(4, 8),
- CI.getRobotArm(4, 8) },
- Materials.Redstone.getMolten(144 * 32),
- GregtechItemList.Gregtech_Computer_Cube_Machine.get(1),
- 20 * 60 * 10,
- MaterialUtils.getVoltageForTier(4));
- }
-
private static void gt4FarmManager() {
ItemList[] aInputHatches = new ItemList[] { ItemList.Hatch_Input_LV, ItemList.Hatch_Input_MV,
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
index 3828a66353..fee3c12277 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
@@ -39,8 +39,6 @@ import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config;
import gtPlusPlus.xmod.gregtech.api.world.GTPP_Worldgen;
import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler;
-import gtPlusPlus.xmod.gregtech.common.computer.GT_ComputerCube_Setup;
-import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_ElementalDuplicator;
import gtPlusPlus.xmod.gregtech.loaders.Gregtech_Blocks;
@@ -127,8 +125,6 @@ public class HANDLER_GT {
CokeAndPyrolyseOven.onLoadComplete();
generateElementalDuplicatorRecipes();
Meta_GT_Proxy.fixIC2FluidNames();
- GT_Computercube_Description.addStandardDescriptions();
- GT_ComputerCube_Setup.init();
RecipeLoader_AlgaeFarm.generateRecipes();
if (AdvancedSolarPanel.isModLoaded()) {
RecipeLoader_MolecularTransformer.run();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index e341ee5a8c..e4939eda42 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -162,7 +162,6 @@ public enum GregtechItemList implements GregtechItemContainer {
// Computer Cube
Gregtech_Computer_Cube,
- Gregtech_Computer_Cube_Machine,
// Casings for batteries
Battery_Casing_Gem_1,
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
index 0b7e44ce14..96ff9f6aef 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
@@ -110,14 +110,7 @@ public enum GregtechOrePrefixes {
// by
// Calclavia
chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced
- // by
- // Buildcraft
- computer("Computers", "", "", true, true, false, false, true, false, false, false, false, false, 0, -1, 64, -1),; // A
- // whole
- // Computer.
- // "computerMaster"
- // =
- // ComputerCube
+ ;
public static volatile int VERSION = 508;
@@ -208,8 +201,6 @@ public enum GregtechOrePrefixes {
getTcAspectStack(TC_Aspects.ITER.name(), 2).addToAspectList(this.mAspects);
} else if (this.name().startsWith("circuit")) {
getTcAspectStack("COGNITIO", 1);
- } else if (this.name().startsWith("computer")) {
- getTcAspectStack("COGNITIO", 4).addToAspectList(this.mAspects);
} else if (this.name().startsWith("battery")) {
getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java
index 8cf0e88473..f7cd6cab23 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java
@@ -29,8 +29,6 @@ public class GTPP_UITextures {
public static final UITexture BUTTON_STANDARD_BRONZE = UITexture
.fullImage(GTPlusPlus.ID, "gui/button/standard_bronze");
- public static final UITexture BUTTON_STANDARD_16x16 = UITexture
- .fullImage(GTPlusPlus.ID, "gui/button/standard_16x16");
public static final UITexture OVERLAY_SLOT_WEED_EX = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/weed_ex");
public static final UITexture OVERLAY_SLOT_FERTILIZER = UITexture
@@ -74,8 +72,6 @@ public class GTPP_UITextures {
.fullImage(GTPlusPlus.ID, "gui/progressbar/boiler_empty");
public static final UITexture PROGRESSBAR_FUEL = UITexture.fullImage(GTPlusPlus.ID, "gui/progressbar/fuel");
public static final UITexture PROGRESSBAR_ARROW_2 = UITexture.fullImage(GTPlusPlus.ID, "gui/progressbar/arrow_2");
- public static final UITexture PROGRESSBAR_COMPUTER_ENERGY = UITexture
- .fullImage(GTPlusPlus.ID, "gui/progressbar/computer_energy");
public static final UITexture PROGRESSBAR_PSS_ENERGY = UITexture
.fullImage(GTPlusPlus.ID, "gui/progressbar/pss_energy");
@@ -100,16 +96,6 @@ public class GTPP_UITextures {
public static final UITexture[] OVERLAY_BUTTON_MODE = IntStream.range(0, 10) // GT_MetaTileEntity_ElectricAutoWorkbench#MAX_MODES
.mapToObj(i -> UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/mode_" + i))
.collect(Collectors.toList()).toArray(new UITexture[0]);
- public static final UITexture OVERLAY_BUTTON_COMPUTER_MODE = UITexture
- .fullImage(GTPlusPlus.ID, "gui/overlay_button/computer_mode");
- public static final UITexture OVERLAY_BUTTON_SAVE = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/save");
- public static final UITexture OVERLAY_BUTTON_LOAD = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/load");
- public static final UITexture OVERLAY_BUTTON_NUCLEAR_SWITCH = UITexture
- .fullImage(GTPlusPlus.ID, "gui/overlay_button/nuclear_switch");
- public static final UITexture OVERLAY_BUTTON_ARROW_LEFT = UITexture
- .fullImage(GTPlusPlus.ID, "gui/overlay_button/arrow_left");
- public static final UITexture OVERLAY_BUTTON_ARROW_RIGHT = UITexture
- .fullImage(GTPlusPlus.ID, "gui/overlay_button/arrow_right");
public static final UITexture[] OVERLAY_BUTTON_DIRECTION = new UITexture[] {
UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/bottom"),
UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/top"),
@@ -139,14 +125,6 @@ public class GTPP_UITextures {
.fullImage(GTPlusPlus.ID, "gui/picture/workbench_circle");
public static final UITexture PICTURE_ARROW_WHITE_DOWN = UITexture
.fullImage(GTPlusPlus.ID, "gui/picture/arrow_white_down");
- public static final UITexture PICTURE_V202 = UITexture.fullImage(GTPlusPlus.ID, "gui/picture/v202");
- public static final UITexture PICTURE_COMPUTER_TOP = UITexture.fullImage(GTPlusPlus.ID, "gui/picture/computer_top");
- public static final UITexture PICTURE_COMPUTER_GRID = UITexture
- .fullImage(GTPlusPlus.ID, "gui/picture/computer_grid");
- public static final UITexture PICTURE_ARROWS_SEPARATE = UITexture
- .fullImage(GTPlusPlus.ID, "gui/picture/arrows_separate");
- public static final UITexture PICTURE_ARROWS_FUSION = UITexture
- .fullImage(GTPlusPlus.ID, "gui/picture/arrows_fusion");
public static final UITexture PICTURE_REDSTONE_CIRCUIT_SCREEN = UITexture
.fullImage(GTPlusPlus.ID, "gui/picture/redstone_circuit_screen");
public static final UITexture PICTURE_ELECTRICITY_ERROR = UITexture
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java
deleted file mode 100644
index 7070fe5c8d..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.widget;
-
-import com.gtnewhorizons.modularui.api.ModularUITextures;
-import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
-import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
-import com.gtnewhorizons.modularui.common.widget.SlotWidget;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.gui.modularui.GT_UITextures;
-import gregtech.api.util.GT_Utility;
-
-public class DataStickSlotWidget extends SlotWidget {
-
- public DataStickSlotWidget(IItemHandlerModifiable handler, int index) {
- this(new BaseSlot(handler, index) {
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
- });
- }
-
- private DataStickSlotWidget(BaseSlot slot) {
- super(slot);
- setFilter(
- stack -> GT_Utility.areStacksEqual(stack, ItemList.Tool_DataStick.get(1), true)
- || GT_Utility.areStacksEqual(stack, ItemList.Tool_DataOrb.get(1), true));
- setBackground(ModularUITextures.ITEM_SLOT, GT_UITextures.OVERLAY_SLOT_DATA_ORB);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index abcfa09f13..cac8aa742f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -580,7 +580,6 @@ public class TexturesGtBlock {
public static final CustomIcon Casing_Electric_Auto_Workbench_Side = new CustomIcon(
"TileEntities/gt4/OVERLAY_SIDE_CABINET");
- public static final CustomIcon Casing_Computer_Cube = new CustomIcon("TileEntities/gt4/computer");
public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP");
public static final CustomIcon Casing_CropHarvester_Boxes = new CustomIcon("TileEntities/gt4/OVERLAY_BOXES");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java
deleted file mode 100644
index e14d8eec78..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.computer;
-
-import static gregtech.api.enums.Mods.BartWorks;
-import static gregtech.api.enums.Mods.GoodGenerator;
-import static gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube.sReactorList;
-
-import java.util.ArrayList;
-
-import net.minecraft.item.ItemStack;
-
-import Ic2ExpReactorPlanner.ComponentFactory;
-import gregtech.api.enums.ItemList;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_ModHandler;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.xmod.bartworks.BW_Utils;
-import gtPlusPlus.xmod.goodgenerator.GG_Utils;
-
-public class GT_ComputerCube_Setup {
-
- public static void init() {
- Logger.INFO(
- "[Reactor Simulator] Added " + ComponentFactory.getComponentCount()
- + " components to ComponentFactory.");
- if (sReactorList == null) {
- sReactorList = new ArrayList<GT_ItemStack>();
-
- String[] aIc2Items = new String[] { "reactorUraniumSimple", "reactorUraniumDual", "reactorUraniumQuad", /*
- * "reactorIsotopeCell",
- */
- "reactorReflector", "reactorReflectorThick", "reactorCoolantSimple", "reactorCoolantTriple",
- "reactorCoolantSix", "reactorCondensator", "reactorCondensatorLap", "reactorPlating",
- "reactorPlatingHeat", "reactorPlatingExplosive", "reactorVent", "reactorVentCore",
- "reactorVentGold", "reactorVentSpread", "reactorVentDiamond", "reactorHeatSwitch",
- "reactorHeatSwitchCore", "reactorHeatSwitchSpread",
- "reactorHeatSwitchDiamond", /* "reactorHeatpack", */
- };
-
- for (String aItem : aIc2Items) {
- ItemStack aStack = GT_ModHandler.getIC2Item(aItem, 1);
- if (!ItemUtils.checkForInvalidItems(aStack)) {
- Logger.INFO("Unable to find IC2 Item: " + aItem);
- CORE.crash("Unable to find IC2 Item: " + aItem);
- } else {
- sReactorList.add(new GT_ItemStack(aStack.copy()));
- }
- }
-
- ItemList[] aGtItems = new ItemList[] { ItemList.Neutron_Reflector, ItemList.Moxcell_1, ItemList.Moxcell_2,
- ItemList.Moxcell_4, /* ItemList.Uraniumcell_1, ItemList.Uraniumcell_2, ItemList.Uraniumcell_4, */
- ItemList.NaquadahCell_1, ItemList.NaquadahCell_2, ItemList.NaquadahCell_4, ItemList.ThoriumCell_1,
- ItemList.ThoriumCell_2, ItemList.ThoriumCell_4, ItemList.MNqCell_1, ItemList.MNqCell_2,
- ItemList.MNqCell_4, ItemList.Reactor_Coolant_He_1, ItemList.Reactor_Coolant_He_3,
- ItemList.Reactor_Coolant_He_6, ItemList.Reactor_Coolant_NaK_1, ItemList.Reactor_Coolant_NaK_3,
- ItemList.Reactor_Coolant_NaK_6, ItemList.Reactor_Coolant_Sp_1, ItemList.Reactor_Coolant_Sp_2,
- ItemList.Reactor_Coolant_Sp_3, ItemList.Reactor_Coolant_Sp_6 };
-
- for (ItemList aItem : aGtItems) {
- sReactorList.add(new GT_ItemStack(aItem.get(1)));
- }
-
- if (BartWorks.isModLoaded()) {
- ArrayList<ItemStack> aBartReactorItems = BW_Utils.getAll(1);
- for (ItemStack aReactorItem : aBartReactorItems) {
- sReactorList.add(new GT_ItemStack(aReactorItem));
- }
- }
-
- if (GoodGenerator.isModLoaded()) {
- ArrayList<ItemStack> aGlodReactorItems = GG_Utils.getAll(1);
- for (ItemStack aReactorItem : aGlodReactorItems) {
- sReactorList.add(new GT_ItemStack(aReactorItem));
- }
- }
- Logger.INFO(
- "[Reactor Simulator] Added " + sReactorList.size() + " components to GT_TileEntity_ComputerCube.");
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java
deleted file mode 100644
index 2e7a7c7ffb..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java
+++ /dev/null
@@ -1,294 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.computer;
-
-import java.util.ArrayList;
-
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.enums.ItemList;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.FluidUtils;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-
-public class GT_Computercube_Description {
-
- public static ArrayList<GT_Computercube_Description> sDescriptions = new ArrayList<GT_Computercube_Description>();
-
- public String[] mDescription;
-
- public ItemStack[] mStacks;
-
- public GT_Computercube_Description(String[] aDescription, ItemStack[] aStacks) {
- this.mDescription = aDescription;
- this.mStacks = aStacks;
- sDescriptions.add(this);
- }
-
- public static void addStandardDescriptions() {
- Logger.INFO("Adding Default Description Set of the Computer Cube");
- new GT_Computercube_Description(
- new String[] { "Lightning Rod", "Also known as the Bane of", "Alblaka. The Lightning Rod",
- "enables you to gain Energy", "from Lightning! To set it up", "you just need the Block",
- "itself, 4 HV-Transformers", "and a crapton of Ironfences,", "which you then place on top",
- "of it. After that you have to", "wait for a Thunderstorm and", "when you are lucky you get",
- "2.5 MFSU of Energy out of", "it. If a Rod is high enough", "then Rain is also enough to",
- "get stroke, but with less", "probability ofcourse." },
- new ItemStack[] { GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1),
- GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1),
- ItemList.Machine_IV_LightningRod.get(1), null, null, null, null, null, null, null, null,
- null });
- new GT_Computercube_Description(
- new String[] { "Quantum Chest", "You want to store tons of", "Materials into your Chests",
- "but you hate the Item limit", "of them? Not anymore! The", "Quantum Chest is able to",
- "store an INFINITE* amount", "of one single Item type per", "Chest.",
- "This Chest stores your Items", "like Data and ever has a", "Stack of the Item ready for",
- "extraction. It is compatible", "with any Item that doesnt", "have a NBT-Tag. You ask what",
- "NBT is? I know it, thats enough.", "Up to 2147483391*" },
- new ItemStack[] { ItemList.Quantum_Chest_IV.get(1), ItemList.Quantum_Chest_EV.get(1),
- ItemList.Quantum_Chest_HV.get(1), ItemList.Quantum_Chest_MV.get(1),
- ItemList.Quantum_Chest_LV.get(1), null, null, null, null, null, null, null, null, null });
- new GT_Computercube_Description(
- new String[] { "Quantum Tank", "You want to store tons of", "Fluids into your Tanks",
- "but you hate the capacity", "of them? Not anymore! The", "Quantum Tank is able to",
- "store an INFINITE* amount", "of one single Fluid type per", "Tank.",
- "This Tank stores your Fluids", "like Data and ever has a", "Stack of the Fluid ready for",
- "extraction. It is compatible", "with any Fluid. ", "You ask what",
- "NBT is? I know it, thats enough.", "* = 2147483391" },
- new ItemStack[] { ItemList.Quantum_Tank_IV.get(1), ItemList.Quantum_Tank_EV.get(1),
- ItemList.Quantum_Tank_HV.get(1), ItemList.Quantum_Tank_MV.get(1),
- ItemList.Quantum_Tank_LV.get(1), null, null, null, null, null, null, null, null, null });
- new GT_Computercube_Description(
- new String[] { "Computer Cube", "The Device you are", "currently using. This Computer",
- "is running the G.L.A.D.-OS,", "which is containing many", "usefull Apps:", "- Reactor Planner",
- "- Seedbag Scanner", "- Recipelists for GT-Devices", "- ", "- ", "- ", "- ", "- ",
- "And the Description List you", "are currently reading.", "~This Device has private Access~" },
- new ItemStack[] { null, null, null, null, GregtechItemList.Gregtech_Computer_Cube_Machine.get(1), null,
- null, null, null, null, null, null, null, null });
- /*
- * new GT_Computercube_Description(new String[] { "UUM-Assembler", "It's like an automatic",
- * "Crafting Table just for UUM", "It can store 20 UUM-Recipes", "and produces those on demand",
- * "It costs 512EU per used piece", "of Universal-Usable-Matter(TM).", "The integrated Quantum Chest",
- * "allows it to store all your", "UUM inside it.", "Top and Bottom are for Input,",
- * "while the Output is on the", "Sides. The Output is designed,", "to work with RP-Managers, so",
- * "build it into your recursive", "Autocraftingsystem.", "" }, new ItemStack[] { null, null, null,
- * GT_ModHandler.getIC2Item("matter", 1), new ItemStack(GregTech_API.sBlockList[1], 1, 5), null, null, null,
- * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Sonictron",
- * "You like Music? Then the", "Sonictron 9001 is your best", "choice! You can compose Alarms,",
- * "Doorbell Sounds or boring", "Elevator Music, with the 64 Slots", "inside it. Just leftclick them",
- * "to switch the Sound, rightclick", "them to switch the modulation", "and shiftclick to remove it.",
- * "Then apply Redstone to play", "With the mobile Version you can", "play sounds everywhere, after",
- * "you copied them from a normal", "Sonictron via rightclicking", "Sneakrightclicking pastes",
- * "Emits Redstone when finished." }, new ItemStack[] { null, null, null, GregTech_API.getGregTechItem(32, 1,
- * 0), new ItemStack(GregTech_API.sBlockList[1], 1, 6), null, null, null, null, null, null, null, null, null });
- * new GT_Computercube_Description(new String[] { "L.E.S.U.", "The unlaggiest Multiblock ever!",
- * "One Controllerblock, and as many", "'stupid' Storageblocks as you want.", "To use it, place one Controller",
- * "and then place the LESU-Storages", "adjacent to it or other placed", "LESU-Storages. The Tier (max EU/t)",
- * "of it depends on the amount of", "adjacent Storages. The", "Storageblocks are NOT TileEntities,",
- * "what means that they cause as much", "Lag as a random Dirtblock. And the",
- * "Controller Block only checks ONCE", "for the Storages, so no", "Blockiterationlag, AT. ALL. Anyone,",
- * "who says that they lag gets murdered!" }, new ItemStack[] { null, null, null, new
- * ItemStack(GregTech_API.sBlockList[0], 1, 6), new ItemStack(GregTech_API.sBlockList[1], 1, 7), null, null,
- * null, null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "I.D.S.U.",
- * "The Interdimensional Storage Unit", "is a Device, which is like a", "wireless, crossdimensional and",
- * "enderchestlike EU-Storage Block", "", "Every Player has one Network of", "these. The ID is determined by",
- * "the Hashcode of the Name from the", "first Player, who opens it's GUI", "", "It stores up to 1 Billion EU",
- * "and emits EV. But you need at", "least two of them for Energy", "Transfer", "", "" }, new ItemStack[] {
- * null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 8), null, null, null, null, null, null,
- * null, null, null }); new GT_Computercube_Description(new String[] { "A.E.S.U.",
- * "The Adjustable Energy Storage Unit", "is like 10 MFSU and has an", "adjustable Output between 0 and",
- * "2048EU/t. You could use it as a", "Transformer. It is Tier-IV, so", "it's basically needed to charge",
- * "Energy Orbs and Lapotron Packs", "", "Not much else to say about it.", "", "", "", "", "", "", "" }, new
- * ItemStack[] { null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 9), null, null, null,
- * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Charge-O-Mat",
- * "An automatable Charging Bench", "It puts (de-)charged Tools into", "the right Outputslots, which are",
- * "accessible on the Sides of it.", "", "The Energy Orb inside stores enough",
- * "to charge your QSuit almost instantly", "", "This is a Tier-V Charging Station",
- * "even when the Max-IN/OUT is only", "2048EU/t. It also charges your Armor",
- * "when you are standing close to it.", "", "If you apply Redstone, then it", "decharges instead.", "" }, new
- * ItemStack[] { null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 10), null, null, null,
- * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Centrifuge",
- * "This is a Machine to seperate", "Isotopes.", "", "It has a maximum Consumption Rate",
- * "of 5EU/t, and its Maxinput is", "32EU/t. The time it needs depends", "on the Recipe you use.", "",
- * "It needs Tin Cells for some Recipes,", "which you put in the Top Left Slot", "", "Top = Input",
- * "Bottom = Tin Cells", "Side = Output", "", "You can pipe Lava into this Device" }, new ItemStack[] { null,
- * null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 11), null, null, null, null, null, null, null,
- * null, null }); new GT_Computercube_Description(new String[] { "Electrolyzer",
- * "This is a Machine to seperate", "Molecules and electrolyze", "Watercells.", "",
- * "It has a maximum Consumption Rate", "of 128EU/t, and its Maxinput is", "128EU/t. The time it needs depends",
- * "on the Recipe you use.", "", "It needs Tin Cells for some Recipes,",
- * "which you put in the Bottom Left Slot", "", "Top = Input", "Bottom = Tin Cells", "Side = Output", "" }, new
- * ItemStack[] { null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 25), null, null, null,
- * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Grinder",
- * "This Machines purpose is to", "macerate and grind Ores.", "It can ONLY grind Ores, don't",
- * "try regular Macerator Recipes.", "It has a fixed Consumption Rate", "of 128EU/t, and its Maxinput is",
- * "128EU/t. The time it needs is", "5 seconds per Ore Block", "It needs Water for most Recipes,",
- * "which you put in the Bottom Left Slot", "Top = Input", "Bottom = Water", "Side = Output",
- * "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)"
- * }, new ItemStack[] { null, new ItemStack(Block.field_71943_B, 1), new ItemStack(GregTech_API.sBlockList[0],
- * 1, 14), new ItemStack(GregTech_API.sBlockList[0], 1, 13), new ItemStack(GregTech_API.sBlockList[1], 1, 28),
- * null, null, null, null, null, null, null, null, null });
- */
- new GT_Computercube_Description(
- new String[] { "Electric Blast Furnace", "You may know the Blast Furnace",
- "of Railcraft. This one works", "similar, as it can also produce",
- "Steel out of Iron and Coal.", "", "Its heat Capacity depends on the",
- "used Machine Casings for building", "it. The better they are, the more",
- "Heat it can achieve.", "", "Top = Input 1", "Bottom = Input 2", "Side = Output",
- "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing",
- "for this Device. (see GUI)" },
- new ItemStack[] { null, null, null, ItemList.Casing_HeatProof.get(1),
- ItemList.Machine_Multi_BlastFurnace.get(1), ItemList.Casing_Coil_Cupronickel.get(1),
- ItemList.Casing_Coil_Kanthal.get(1), ItemList.Casing_Coil_Nichrome.get(1),
- ItemList.Casing_Coil_TungstenSteel.get(1), ItemList.Casing_Coil_HSSG.get(1),
- ItemList.Casing_Coil_HSSS.get(1), ItemList.Casing_Coil_Naquadah.get(1),
- ItemList.Casing_Coil_NaquadahAlloy.get(1), null });
- /*
- * new GT_Computercube_Description(new String[] { "Sawmill", "This Device turns your Logs",
- * "into more Planks, than a normal", "Steve can produce with his Hands.", "",
- * "Its byproduct, Wood Pulp, can be", "compressed into special Planks,", "which are burning like Charcoal.",
- * "", "It needs Water for most Recipes,", "which you put in the Bottom Left Slot", "Top = Input",
- * "Water Sides = Water", "Saw Side = Output", "Its a lagfree Multiblock Structure,",
- * "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] { null, null,
- * GT_MetaItem_Material.instance.getStack(15, 1), GT_MetaItem_Dust.instance.getStack(15, 1), new
- * ItemStack(GregTech_API.sBlockList[1], 1, 32), null, null, null, null, null, null, null, null, null });
- */
- new GT_Computercube_Description(
- new String[] { "Implosion Compressor", "You need to turn Dusts back", "into Gems? Or do you just want",
- "to make Iridium Plates?", "With a bit ITNT you can achieve", "that in this Device!", "",
- "We strongly recommend to use", "Flint Dust instead of Flints", "for making the ITNT.", "",
- "Top = Input", "Explosion Sides = Output", "ITNT Side = ITNT Input",
- "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing",
- "for this Device. (see GUI)" },
- new ItemStack[] { null, null, null,
- GT_ModHandler.getIC2Item("industrialTnt", 1, new ItemStack(net.minecraft.init.Blocks.tnt, 1)),
- ItemList.Machine_Multi_ImplosionCompressor.get(1), null, null, null, null, null, null, null,
- null, null });
- /*
- * new GT_Computercube_Description(new String[] { "Superconductor", "Expensive, but superconducting",
- * "nearly infinite EU/p and it has", "no Cableloss!", "Do not confuse this with the", "Superconductor Item!",
- * "", "Supercondensator", "This is a special kind of Transformer", "It allows you to convert anything down",
- * "to 8192 EU/t, what is like a normal HVT.", "But if you apply Redstone to it then it",
- * "outputs friggin 1000000EU/t!!!", "", "You also need it for the Fusion Reactor.",
- * "Some Machines will require that high", "Voltage in a short period of time." }, new ItemStack[] { null, null,
- * GregTech_API.getGregTechItem(3, 1, 2), new ItemStack(GregTech_API.sBlockList[1], 1, 12), new
- * ItemStack(GregTech_API.sBlockList[1], 1, 15), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Player Detector", "This nice little Device is able",
- * "to detect Players in a Range of", "16-Spherical Meters and a", "EU-Consumption of 2.5EU/t.", "",
- * "It can be switched to 3 Diffrent", "Modes, to detect YOURSELF, OTHERS",
- * "and ALL Players by Rightclicking it.", "", "It doesnt detect regular Mobs.", "", "", "", "", "",
- * "~This Device has private Access~" }, new ItemStack[] { null, null, null, null, new
- * ItemStack(GregTech_API.sBlockList[1], 1, 13), null, null, null, null, null, null, null, null, null });
- */
- new GT_Computercube_Description(
- new String[] { "Matter Fabricator", "The Matter Fabricator is nothing",
- "else than a Mass Fabricator, which", "can ONLY run on Scrap and other", "Amplifiers.", "",
- "With the Default Config it is 100", "times more expensive than normal.",
- "Of course you can set the Config", "to 166666, to get your normal",
- "Massfabricationrate back, or you", "could make Mass Fabrication even",
- "cheaper, if you really want to", "make Mass Fabrication that easy", "", "", "" },
- new ItemStack[] { null, null, null, GT_Utility.getFluidDisplayStack(FluidUtils.getUUM(1), false),
- ItemList.Machine_LV_Massfab.get(1), null, null, null, null, null, null, null, null, null });
- new GT_Computercube_Description(
- new String[] { "Electric Autocrafting Tables", "These are Crafting Tables for the",
- "common need of autocrafting in", "Factories. One Craft needs 5000EU to",
- "be performed, so you have actually to", "lay Wires to it. This Table is",
- "unique as its also able, to give you", "the used Capsulecellcontainers, made",
- "by Industrial Corp, back.", "You may use that behaviour to",
- "craft anything releated to chemics,", "like the 2xKNO3-Recipe for Saltpeter.",
- "The 5 Modes are the following:", "1. Craft Recipe, 2. All 5 Modes",
- "3. Craft all as single Items", "4. 2x2-Grid and 5. a 3x3-Grid.",
- "It accepts only 32EU/p as Input." },
- new ItemStack[] { null, null, null, null, GregtechItemList.GT4_Electric_Auto_Workbench_LV.get(1), null,
- null, null, null, null, null, null, null, null });
- /*
- * new GT_Computercube_Description(new String[] { "Automation with GregTech",
- * "Translocators and Buffers are the", "newest Way to automate your Machines.",
- * "Screw Buildcraft, these EU-wasting", "Devices are much more awesome.",
- * "They output 32EU/t to their directed", "IN- and OUT-puts, making them usefull",
- * "for things, like saving wires.", "Translocators are taking Stuff from",
- * "the Block at their green Inputfacing", "and putting it into the Block at the",
- * "red Outputfacing. Buffers do the same,", "but the grab Items from their own",
- * "Inventory, what makes them usefull", "as Pipe-replacement.", "Buffers also have Redstone Intelligence,",
- * "which you can configure in their GUI." }, new ItemStack[] { null, null, new
- * ItemStack(GregTech_API.sBlockList[1], 1, 19), new ItemStack(GregTech_API.sBlockList[1], 1, 18), new
- * ItemStack(GregTech_API.sBlockList[1], 1, 17), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Silver Ore", "It's rarity is similar to Gold",
- * "Silver can be used, to make", "Circuits cheaper, or you can use", "it for Redpowerstuff.", "", "", "", "",
- * "", "", "", "", "", "", "", "" }, new ItemStack[] { null, null, GT_OreDictUnificator.get("dustSilver", 1),
- * GregTech_API.getGregTechItem(0, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 1), null, null, null,
- * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Sapphires and Rubys",
- * "These spawn exactly like Emeralds.", "But Rubies are found in Deserts,", "while Sapphires can be found in",
- * "Oceans.", "", "They currently make only a cheaper", "Recipe for Energycrystals and",
- * "Lapotroncrystals, but they are", "Redpower Compatible.", "", "They also sometimes drop random",
- * "other Gems, like Garnet for Ruby", "or green Sapphire for Sapphire", "in addition.", "", "" }, new
- * ItemStack[] { null, GregTech_API.getGregTechItem(0, 1, 32), new ItemStack(GregTech_API.sBlockList[2], 1, 3),
- * GregTech_API.getGregTechItem(0, 1, 33), new ItemStack(GregTech_API.sBlockList[2], 1, 4), null, null, null,
- * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Bauxite Ore",
- * "The Stuff out of which you can", "produce Aluminium and also", "Titanium.",
- * "You find this Ore in Plains and", "Forests.", "", "If you think Aluminium is useless",
- * "then note, that mobs NEVER spawn", "ontop of an Aluminium Block", "(Same applies also for Silver-,",
- * "Gem- and Iridium Blocks)", "Production Chain:", "macerating Bauxite Ore", "electrolyzing 24 Bauxite Dust",
- * "smelting Aluminium Dust in a", "Blast Furnace" }, new ItemStack[] { new
- * ItemStack(GregTech_API.sBlockList[0], 1, 7), GregTech_API.getGregTechItem(0, 1, 18),
- * GregTech_API.getGregTechItem(1, 1, 18), GregTech_API.getGregTechItem(1, 1, 17), new
- * ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Titanium", "Produced by centrifuging Bauxitedust",
- * "as a byproduct, this Material can make", "anything much more resistant against", "damage, like Explosions.",
- * "Blocks made of Titaniumingots have a", "large Blastresistance", "", "It can also be used to craft tons of",
- * "mixed Metal Ingots", "", "", "", "", "", "", "" }, new ItemStack[] { new
- * ItemStack(GregTech_API.sBlockList[0], 1, 8), GregTech_API.getGregTechItem(0, 1, 19),
- * GregTech_API.getGregTechItem(1, 1, 19), GregTech_API.getGregTechItem(1, 1, 17), new
- * ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Iridium Ore", "You can find it only when you",
- * "stripmine very large Areas with", "Quarries and such. There is only", "one in every 5th-10th Chunk.",
- * "It's even more rare in Oceans!", "", "Some people disable the UUM-Recipe",
- * "for Iridium, for making getting it", "an Achievement.", "", "However Iridium Ore contains traces",
- * "of Platinum, so it's best to use the", "Industrial Grinder for this Ore.", "", "", "" }, new ItemStack[] {
- * null, null, GT_OreDictUnificator.get("plateAlloyIridium", 1), GT_ModHandler.getIC2Item("iridiumOre", 1), new
- * ItemStack(GregTech_API.sBlockList[2], 1, 2), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Helium Coolant Cell", "These are just cheaper, than the",
- * "Water based Coolant Cells, and can", "also hold six times more Heat.", "",
- * "Helium Cells can also be used for", "making Luminators and Mininglasers", "", "", "", "", "", "", "", "",
- * "", "" }, new ItemStack[] { GregTech_API.getGregTechItem(2, 1, 6), GregTech_API.getGregTechItem(2, 1, 3),
- * GregTech_API.getGregTechItem(34, 1, 0), GregTech_API.getGregTechItem(35, 1, 0),
- * GregTech_API.getGregTechItem(36, 1, 0), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Destructopack", "Open its GUI via rightclick and",
- * "dump all the useless Stuff from", "your Inventory into it, instead of", "littering Items into the World.",
- * "", "", "", "", "", "", "", "", "", "", "", "" }, new ItemStack[] { null, null, null, null,
- * GregTech_API.getGregTechItem(33, 1, 0), null, null, null, null, null, null, null, null, null });
- */
- new GT_Computercube_Description(
- new String[] { "Data Orbs", "They store Data.", "", "Rightclick on a Computer Cube, to",
- "extract a Reactorplan", "", "Sneak-Rightclick on it, to insert", "a Reactorplan", "",
- "Works also with Sonictrons", "", "", "", "", "", "", "" },
- new ItemStack[] { null, null, null, null, ItemList.Tool_DataOrb.get(1), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(
- new String[] { "Energy Orbs", "100 Million EU in one Orb!", "", "This is a Tier-IV-Energystorage",
- "So a MFSU is not enough for it!", "", "Use it to create a Lapotron Pack,",
- "which is like an ultimate Lap Pack!", "", "", "", "", "", "", "", "", "" },
- new ItemStack[] { null, null, null, null, ItemList.Energy_LapotronicOrb.get(1), null, null, null, null,
- null, null, null, null, null });
- new GT_Computercube_Description(
- new String[] { "Iridium Neutron Reflector", "It's used for Fusion Reactor Coils,",
- "and works like a normal one", "inside a Reactor, but it's also", "INDESTRUCTIBLE*.", "", "",
- "", "", "", "", "", "", "", "", "", "* = for weardown" },
- new ItemStack[] { null, null, null, null, ItemList.Neutron_Reflector.get(1), null, null, null, null,
- null, null, null, null, null });
- /*
- * new GT_Computercube_Description(new String[] { "Rock Cutter", "You want to get whole Blocks, but",
- * "your Drill is not enchantable?", "The Rock Cutter has an awesome", "SilkTouch-III-Function!", "",
- * "It works like a Drill, but you", "get the whole Block instead of", "'macerated' Ores!", "",
- * "Put those Blocks into a Macerator", "and double your Diamond Income!", "", "Or better. Use the Industrial",
- * "Grinder to get even more", "Resources!", "" }, new ItemStack[] { null, null, null, null,
- * GregTech_API.getGregTechItem(46, 1, 0), null, null, null, null, null, null, null, null, null }); new
- * GT_Computercube_Description(new String[] { "Tesla Staff", "This completly untested PvP-Weapon",
- * "destroys electric Armor in one hit", "", "The Energy Orb inside it must be",
- * "fully charged to let this work.", "", "We are not responsible for any", "Electrocution Damage to yourself,",
- * "while using it.", "", "We also dont even know, if this", "Weapon has any effect AT ALL.", "", "", "", "" },
- * new ItemStack[] { null, null, null, null, GregTech_API.getGregTechItem(47, 1, 0), null, null, null, null,
- * null, null, null, null, null });
- */
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java
deleted file mode 100644
index 31f378066f..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.computer;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import Ic2ExpReactorPlanner.AutomationSimulator;
-import Ic2ExpReactorPlanner.Reactor;
-import Ic2ExpReactorPlanner.SimulationData;
-import Ic2ExpReactorPlanner.components.ReactorItem;
-import gregtech.api.objects.GT_ItemStack;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
-
-public class GT_Computercube_Simulator {
-
- private static final HashMap<Integer, Pair<Integer, Integer>> sSlotPositions = new HashMap<Integer, Pair<Integer, Integer>>();
-
- static {
- int aSlot = 4;
- for (int column = 0; column < 6; column++) {
- for (int row = 0; row < 9; row++) {
- sSlotPositions.put(aSlot++, new Pair<Integer, Integer>(row, column));
- }
- }
- }
-
- private final Reactor reactor = new Reactor();
-
- public AutomationSimulator simulator = null;
- /**
- * The reactor that was last simulated.
- */
- public Reactor simulatedReactor = null;
-
- private String currentReactorCode = null;
-
- private String currentReactorOldCode = null;
-
- private ArrayList<String> output = new ArrayList<String>();
-
- private final GT_TileEntity_ComputerCube mTile;
-
- public GT_Computercube_Simulator(GT_TileEntity_ComputerCube aTile) {
- mTile = aTile;
- }
-
- public void slotClick(int aSlot, GT_ItemStack aStack) {
-
- /*
- * if (selection != null) { componentToPlace = ComponentFactory.createComponent(selection.getActionCommand());
- * if (componentToPlace != null) {
- * componentToPlace.setInitialHeat(((Number)componentHeatSpinner.getValue()).intValue());
- * componentToPlace.setAutomationThreshold(((Number)placingThresholdSpinner.getValue()).intValue());
- * componentToPlace.setReactorPause(((Number)placingReactorPauseSpinner.getValue()).intValue()); } }
- */
- if (aSlot >= 4 && aSlot < 58) {
- Pair<Integer, Integer> aSpot = sSlotPositions.get(aSlot);
- ReactorItem aItem;
- if (aStack == null) {
- aItem = null;
- } else {
-
- Logger.INFO(
- "Using lookup key: " + ItemUtils.getModId(
- aStack.toStack()) + "." + aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData);
- aItem = ReactorItem.sComponentMap.get(
- ItemUtils.getModId(aStack.toStack()) + "."
- + aStack.mItem.getUnlocalizedName()
- + "."
- + aStack.mMetaData);
- }
- int aRow = aSpot.getKey();
- int aColumn = aSpot.getValue();
- Logger.INFO("Putting " + (aItem == null ? "null" : aItem.name) + " at x:" + aRow + ", y:" + aColumn);
- reactor.setComponentAt(aColumn, aRow, aItem);
- currentReactorCode = reactor.getCode();
- currentReactorOldCode = reactor.getOldCode();
- Logger.INFO("Code: " + currentReactorCode);
- }
- // maxHeatLabel.setText(formatI18n("UI.MaxHeatSpecific", reactor.getMaxHeat()));
- // heatSpinnerModel.setMaximum(reactor.getMaxHeat() - 1);
- // heatSpinnerModel.setValue(Math.min(((Number)heatSpinnerModel.getValue()).intValue(), reactor.getMaxHeat() -
- // 1));
- // temperatureEffectsLabel.setText(formatI18n("UI.TemperatureEffectsSpecific", (int) (reactor.getMaxHeat() *
- // 0.4), (int) (reactor.getMaxHeat() * 0.5), (int) (reactor.getMaxHeat() * 0.7), (int) (reactor.getMaxHeat() *
- // 0.85), (int) (reactor.getMaxHeat() * 1.0)));
- }
-
- public void simulate() {
- /*
- * if (Utils.isClient()) { return; }
- */
- if (simulator != null && simulator.isRunning()) {
- Logger.INFO("Simulator Running, Stopping.");
- simulator.cancel();
- }
- Logger.INFO("Starting Simulator.");
- mTile.mHeat = 0;
- mTile.mEU = 0;
- currentReactorCode = reactor.getCode();
- currentReactorOldCode = reactor.getOldCode();
- output.clear();
- simulatedReactor = new Reactor();
- simulatedReactor.setCode(reactor.getCode());
- Logger.INFO("Making new AutomationSimulator.");
- simulator = new AutomationSimulator(simulatedReactor, output, mTile);
- Logger.INFO("Starting AutomationSimulator.process().");
- simulator.process();
- Logger.INFO("Done.");
-
- SimulationData aData = simulator.getData();
- if (aData != null && aData.totalReactorTicks > 0) {
- mTile.mEU = aData.avgEUoutput * aData.totalReactorTicks;
- mTile.mEUOut = aData.avgEUoutput;
- mTile.mHeat = aData.avgHUoutput;
- mTile.mMaxHeat = aData.maxHUoutput;
- mTile.mExplosionStrength = aData.explosionPower;
- mTile.mHEM = (float) aData.hullHeating;
- mTile.mProgress = aData.totalReactorTicks;
- }
-
- for (String s : output) {
- Logger.INFO(" " + s);
- }
- }
-
- public ArrayList<String> getOutputData() {
- return output;
- }
-
- private void clearGrid() {
- reactor.clearGrid();
- /*
- * for (int i = 0; i < reactorButtons.length; i++) { for (int j = 0; j < reactorButtons[i].length; j++) {
- * reactorButtons[i][j].setIcon(null); reactorButtons[i][j].setToolTipText(null);
- * reactorButtonPanels[i][j].setBackground(Color.LIGHT_GRAY); } }
- */
- output.clear();
- /*
- * materialsArea.setText(reactor.getMaterials().toString());
- * componentListArea.setText(reactor.getComponentList().toString());
- * maxHeatLabel.setText(formatI18n("UI.MaxHeatSpecific", reactor.getMaxHeat()));
- * heatSpinnerModel.setMaximum(reactor.getMaxHeat() - 1); heatSpinnerModel.setValue(Math.min(((Number)
- * heatSpinnerModel.getValue()).intValue(), reactor.getMaxHeat() - 1));
- * temperatureEffectsLabel.setText(formatI18n("UI.TemperatureEffectsSpecific", (int)(reactor.getMaxHeat() *
- * 0.4), (int)(reactor.getMaxHeat() * 0.5), (int)(reactor.getMaxHeat() * 0.7), (int)(reactor.getMaxHeat() *
- * 0.85), (int)(reactor.getMaxHeat() * 1.0))); lockCode = true; codeField.setText(null); lockCode = false;
- */
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java
deleted file mode 100644
index aa0b703a1e..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java
+++ /dev/null
@@ -1,1420 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.misc;
-
-import static gregtech.api.enums.GT_Values.V;
-import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.gtnewhorizons.modularui.api.ModularUITextures;
-import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
-import com.gtnewhorizons.modularui.api.screen.ModularWindow;
-import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
-import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
-import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
-import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
-import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
-import com.gtnewhorizons.modularui.common.widget.ProgressBar;
-import com.gtnewhorizons.modularui.common.widget.SlotWidget;
-import com.gtnewhorizons.modularui.common.widget.TextWidget;
-
-import Ic2ExpReactorPlanner.SimulationData;
-import cpw.mods.fml.common.FMLCommonHandler;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.gui.modularui.GT_UIInfos;
-import gregtech.api.gui.modularui.GT_UITextures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.modularui.IAddGregtechLogo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_AssemblyLineUtils;
-import gregtech.api.util.GT_Assemblyline_Server;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.behaviors.Behaviour_DataOrb;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
-import gtPlusPlus.xmod.gregtech.api.gui.widget.DataStickSlotWidget;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description;
-import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Simulator;
-
-public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank implements IAddGregtechLogo {
-
- public static int MODE_MAIN = 0;
- public static int MODE_REACTOR_PLANNER = 1;
- public static int MODE_SCANNER = 2;
- public static int MODE_CENTRIFUGE = 3;
- public static int MODE_FUSION = 4;
- public static int MODE_INFO = 5;
- public static int MODE_ELECTROLYZER = 6;
-
- public static boolean mSeedscanner = true;
-
- public static boolean mReactorplanner = true;
-
- public static ArrayList<GT_ItemStack> sReactorList;
-
- public boolean mStarted = false;
-
- public int mMode = 0;
-
- public int mHeat = 0;
-
- public long mEUOut = 0;
-
- public int mMaxHeat = 1;
-
- public long mEU = 0;
-
- public int mProgress = 0;
- public int mMaxProgress = 0;
-
- public int mEUTimer = 0;
-
- public int mEULast1 = 0;
-
- public int mEULast2 = 0;
-
- public int mEULast3 = 0;
-
- public int mEULast4 = 0;
-
- public float mHEM = 1.0F, mExplosionStrength = 0.0F;
-
- public String mFusionOutput = "";
-
- private boolean mNeedsUpdate;
-
- private GT_Computercube_Simulator mSimulator;
-
- public GT_TileEntity_ComputerCube(final int aID, final String aDescription) {
- super(aID, "computer.cube", "Computer Cube MKII", 5, 114, aDescription);
- }
-
- public GT_TileEntity_ComputerCube(final String aName, final String aDescription, final ITexture[][][] aTextures) {
- super(aName, 5, 114, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] { this.mDescription, "Built in Reactor Planner", "Built in Scanner", "Built in Info-Bank",
- "Displays Fusion Recipes", CORE.GT_Tooltip.get() };
- }
-
- @Override
- public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
- return true;
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_TileEntity_ComputerCube(this.mName, this.mDescription, this.mTextures);
- }
-
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- ItemStack tStack = aPlayer.getCurrentEquippedItem();
- if (tStack != null && ItemList.Tool_DataOrb.isStackEqual(tStack)) {
- return false;
- }
- return true;
- }
-
- public final GT_Computercube_Simulator getSimulator() {
- return this.mSimulator;
- }
-
- public final void setSimulator(GT_Computercube_Simulator mSimulator) {
- this.mSimulator = mSimulator;
- }
-
- @Override
- public boolean isSimpleMachine() {
- return true;
- }
-
- @Override
- public boolean isEnetInput() {
- return true;
- }
-
- @Override
- public boolean isInputFacing(ForgeDirection aDirection) {
- return true;
- }
-
- @Override
- public long maxAmperesIn() {
- return 4;
- }
-
- @Override
- public long maxEUInput() {
- return GT_Values.V[4];
- }
-
- @Override
- public long maxEUStore() {
- return GT_Values.V[5] * 1024;
- }
-
- @Override
- public boolean ownerControl() {
- return false;
- }
-
- @Override
- public int getSizeInventory() {
- return 114;
- }
-
- @Override
- public boolean isValidSlot(int aIndex) {
- return (aIndex > 53 && aIndex < 58);
- }
-
- @Override
- public boolean isFacingValid(ForgeDirection facing) {
- return true;
- }
-
- public void saveNuclearReactor() {
- for (int i = 0; i < 54; i++) {
- if (this.mInventory[i] == null) {
- this.mInventory[i + 59] = null;
- } else {
- this.mInventory[i + 59] = this.mInventory[i].copy();
- }
- }
- }
-
- public void loadNuclearReactor() {
- for (int i = 0; i < 54; i++) {
- if (this.mInventory[i + 59] == null) {
- this.mInventory[i] = null;
- } else {
- this.mInventory[i] = this.mInventory[i + 59].copy();
- }
- }
- }
-
- public int getXCoord() {
- return this.getBaseMetaTileEntity().getXCoord();
- }
-
- public int getYCoord() {
- return this.getBaseMetaTileEntity().getYCoord();
- }
-
- public int getZCoord() {
- return this.getBaseMetaTileEntity().getZCoord();
- }
-
- public void reset() {
- this.mEU = 0;
- this.mHeat = 0;
- this.mEUOut = 0;
- this.mMaxHeat = 10000;
- this.mHEM = 1.0F;
- this.mExplosionStrength = 0.0F;
- this.mProgress = 0;
- this.mMaxProgress = 0;
- this.mFusionOutput = "";
- this.mInventory[113] = null;
- int i;
- for (i = 0; i < 54; i++) {
- this.mInventory[i] = null;
- this.mInventory[i + 59] = null;
- }
- for (i = 54; i < 58; i++) {
- if (this.mInventory[i] != null) {
- if (!this.getWorld().isRemote) this.getWorld().spawnEntityInWorld(
- (Entity) new EntityItem(
- this.getWorld(),
- this.getXCoord() + 0.5D,
- this.getYCoord() + 0.5D,
- this.getZCoord() + 0.5D,
- this.mInventory[i]));
- this.mInventory[i] = null;
- }
- }
- }
-
- public void switchModeForward() {
- int aTempMode = mMode;
- aTempMode++;
- if (aTempMode == MODE_ELECTROLYZER || aTempMode == MODE_CENTRIFUGE) {
- aTempMode++;
- }
- if (aTempMode >= 7) {
- aTempMode = 0;
- }
- mMode = aTempMode;
- switchMode();
- }
-
- public void switchModeBackward() {
- int aTempMode = mMode;
- aTempMode--;
- if (aTempMode == MODE_ELECTROLYZER || aTempMode == MODE_CENTRIFUGE) {
- aTempMode--;
- }
- if (aTempMode < 0) {
- aTempMode = 6;
- }
- mMode = aTempMode;
- switchMode();
- }
-
- private void switchMode() {
- reset();
- if (this.mMode == MODE_REACTOR_PLANNER && !mReactorplanner) {
- switchMode();
- return;
- }
- if (this.mMode == MODE_SCANNER && !mSeedscanner) {
- switchMode();
- return;
- }
- if (this.mMode == MODE_CENTRIFUGE) {
- showCentrifugeRecipe(0);
- }
- if (this.mMode == MODE_FUSION) {
- showFusionRecipe(0);
- }
- if (this.mMode == MODE_INFO) {
- showDescription(0);
- }
- if (this.mMode == MODE_ELECTROLYZER) {
- showElectrolyzerRecipe(0);
- }
- this.getWorld().addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 10,
- this.mMode);
- this.getWorld().addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
- }
-
- public void showDescription(int aIndex) {
- this.mExplosionStrength = 0.0F;
- if (GT_Computercube_Description.sDescriptions.isEmpty()) {
- return;
- }
- if (aIndex >= GT_Computercube_Description.sDescriptions.size() || aIndex < 0) aIndex = 0;
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[0] == null) {
- this.mInventory[59] = null;
- } else {
- this.mInventory[59] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[0].copy();
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[1] == null) {
- this.mInventory[60] = null;
- } else {
- this.mInventory[60] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[1].copy();
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[2] == null) {
- this.mInventory[61] = null;
- } else {
- this.mInventory[61] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[2].copy();
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[3] == null) {
- this.mInventory[62] = null;
- } else {
- this.mInventory[62] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[3].copy();
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[4] == null) {
- this.mInventory[63] = null;
- } else {
- this.mInventory[63] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[4].copy();
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[5] == null) {
- this.mInventory[64] = null;
- } else {
- this.mInventory[64] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[5].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[6] == null) {
- this.mInventory[65] = null;
- } else {
- this.mInventory[65] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[6].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[7] == null) {
- this.mInventory[66] = null;
- } else {
- this.mInventory[66] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[7].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[8] == null) {
- this.mInventory[67] = null;
- } else {
- this.mInventory[67] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[8].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[9] == null) {
- this.mInventory[68] = null;
- } else {
- this.mInventory[68] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[9].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[10] == null) {
- this.mInventory[69] = null;
- } else {
- this.mInventory[69] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[10].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[11] == null) {
- this.mInventory[70] = null;
- } else {
- this.mInventory[70] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[11].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[12] == null) {
- this.mInventory[71] = null;
- } else {
- this.mInventory[71] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[12].copy();
- this.mExplosionStrength = 100.0F;
- }
- if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[13] == null) {
- this.mInventory[72] = null;
- } else {
- this.mInventory[72] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
- .get(aIndex)).mStacks[13].copy();
- this.mExplosionStrength = 100.0F;
- }
- this.mMaxHeat = aIndex;
- this.getWorld().addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
- }
-
- public void switchDescriptionPageForward() {
- if (++this.mMaxHeat >= GT_Computercube_Description.sDescriptions.size()) this.mMaxHeat = 0;
- showDescription(this.mMaxHeat);
- }
-
- public void switchDescriptionPageBackward() {
- if (--this.mMaxHeat < 0) this.mMaxHeat = GT_Computercube_Description.sDescriptions.size() - 1;
- showDescription(this.mMaxHeat);
- }
-
- public void showCentrifugeRecipe(int aIndex) {
- /*
- * if (aIndex >= GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size() || aIndex < 0) aIndex = 0; GT_Recipe
- * tRecipe = GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.get(aIndex); if (tRecipe != null) { if
- * (tRecipe.mInput1 == null) { this.mInventory[59] = null; } else { this.mInventory[59] =
- * tRecipe.mInput1.copy(); } if (tRecipe.mInput2 == null) { this.mInventory[60] = null; } else {
- * this.mInventory[60] = tRecipe.mInput2.copy(); } if (tRecipe.mOutput1 == null) { this.mInventory[61] = null; }
- * else { this.mInventory[61] = tRecipe.mOutput1.copy(); } if (tRecipe.mOutput2 == null) { this.mInventory[62] =
- * null; } else { this.mInventory[62] = tRecipe.mOutput2.copy(); } if (tRecipe.mOutput3 == null) {
- * this.mInventory[63] = null; } else { this.mInventory[63] = tRecipe.mOutput3.copy(); } if (tRecipe.mOutput4 ==
- * null) { this.mInventory[64] = null; } else { this.mInventory[64] = tRecipe.mOutput4.copy(); } this.mEU =
- * tRecipe.mDuration * 5; this.mMaxHeat = aIndex; } this.getWorld().addBlockEvent(this.xCoord, this.yCoord,
- * this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat);
- */ }
-
- public void switchCentrifugePageForward() {
- if (++this.mMaxHeat >= GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size()) this.mMaxHeat = 0;
- // showCentrifugeRecipe(this.mMaxHeat);
- }
-
- public void switchCentrifugePageBackward() {
- if (--this.mMaxHeat < 0) this.mMaxHeat = GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size() - 1;
- // showCentrifugeRecipe(this.mMaxHeat);
- }
-
- public void showElectrolyzerRecipe(int aIndex) {
- /*
- * if (aIndex >= GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size() || aIndex < 0) aIndex = 0; GT_Recipe
- * tRecipe = GT_Recipe_Map.sElectrolyzerRecipes.get(aIndex); if (tRecipe != null) { if (tRecipe.mInput1 == null)
- * { this.mInventory[59] = null; } else { this.mInventory[59] = tRecipe.mInput1.copy(); } if (tRecipe.mInput2 ==
- * null) { this.mInventory[60] = null; } else { this.mInventory[60] = tRecipe.mInput2.copy(); } if
- * (tRecipe.mOutput1 == null) { this.mInventory[61] = null; } else { this.mInventory[61] =
- * tRecipe.mOutput1.copy(); } if (tRecipe.mOutput2 == null) { this.mInventory[62] = null; } else {
- * this.mInventory[62] = tRecipe.mOutput2.copy(); } if (tRecipe.mOutput3 == null) { this.mInventory[63] = null;
- * } else { this.mInventory[63] = tRecipe.mOutput3.copy(); } if (tRecipe.mOutput4 == null) { this.mInventory[64]
- * = null; } else { this.mInventory[64] = tRecipe.mOutput4.copy(); } this.mEU = tRecipe.mDuration *
- * tRecipe.mEUt; this.mMaxHeat = aIndex; } this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord,
- * (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat);
- */ }
-
- public void switchElectrolyzerPageForward() {
- if (++this.mMaxHeat >= GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size()) this.mMaxHeat = 0;
- showElectrolyzerRecipe(this.mMaxHeat);
- }
-
- public void switchElectrolyzerPageBackward() {
- if (--this.mMaxHeat < 0) this.mMaxHeat = GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size() - 1;
- showElectrolyzerRecipe(this.mMaxHeat);
- }
-
- public static ArrayList<GT_Recipe> sFusionReactorRecipes = new ArrayList<GT_Recipe>();
-
- public void showFusionRecipe(int aIndex) {
-
- if (sFusionReactorRecipes.isEmpty()) {
- for (GT_Recipe aRecipe : GT_Recipe_Map.sFusionRecipes.mRecipeList) {
- sFusionReactorRecipes.add(aRecipe);
- }
- Collections.sort(sFusionReactorRecipes);
- }
-
- if (aIndex >= sFusionReactorRecipes.size() || aIndex < 0) {
- aIndex = 0;
- }
- GT_Recipe tRecipe = sFusionReactorRecipes.get(aIndex);
- if (tRecipe != null) {
- if (tRecipe.mFluidInputs[0] == null) {
- this.mInventory[59] = null;
- } else {
- this.mInventory[59] = GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[0], true);
- }
- if (tRecipe.mFluidInputs[1] == null) {
- this.mInventory[60] = null;
- } else {
- this.mInventory[60] = GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[1], true);
- }
- if (tRecipe.mFluidOutputs[0] == null) {
- this.mInventory[61] = null;
- } else {
- this.mInventory[61] = GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[0], true);
- }
- this.mEU = tRecipe.mSpecialValue;
- this.mEUOut = tRecipe.mEUt;
- this.mHeat = tRecipe.mDuration;
- this.mMaxHeat = aIndex;
- this.mFusionOutput = tRecipe.mFluidOutputs[0].getLocalizedName();
- }
- this.getWorld().addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
- }
-
- public void switchFusionPageForward() {
- if (++this.mMaxHeat >= sFusionReactorRecipes.size()) this.mMaxHeat = 0;
- showFusionRecipe(this.mMaxHeat);
- }
-
- public void switchFusionPageBackward() {
- if (--this.mMaxHeat < 0) this.mMaxHeat = sFusionReactorRecipes.size() - 1;
- showFusionRecipe(this.mMaxHeat);
- }
-
- public void switchNuclearReactor() {
- if (this.mStarted) {
- stopNuclearReactor();
- } else {
- startNuclearReactor();
- }
- }
-
- public void startNuclearReactor() {
- this.mStarted = true;
- this.mHeat = 0;
- this.mEU = 0;
- mSimulator.simulate();
- }
-
- public void stopNuclearReactor() {
- this.mStarted = false;
- mSimulator.simulate();
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setInteger("mMode", this.mMode);
- aNBT.setInteger("mProgress", this.mProgress);
- aNBT.setInteger("mMaxProgress", this.mMaxProgress);
- aNBT.setBoolean("mStarted", this.mStarted);
- int[] aSplitLong1 = MathUtils.splitLongIntoTwoIntegers(mEU);
- aNBT.setInteger("mEU1", aSplitLong1[0]);
- aNBT.setInteger("mEU2", aSplitLong1[1]);
- aNBT.setInteger("mHeat", this.mHeat);
- int[] aSplitLong2 = MathUtils.splitLongIntoTwoIntegers(mEUOut);
- aNBT.setInteger("mEUOut1", aSplitLong2[0]);
- aNBT.setInteger("mEUOut2", aSplitLong2[1]);
- aNBT.setInteger("mMaxHeat", this.mMaxHeat);
- aNBT.setFloat("mHEM", this.mHEM);
- aNBT.setFloat("mExplosionStrength", this.mExplosionStrength);
- aNBT.setString("mFusionOutput", this.mFusionOutput);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- this.mMode = aNBT.getInteger("mMode");
- this.mProgress = aNBT.getInteger("mProgress");
- this.mMaxProgress = aNBT.getInteger("mMaxProgress");
- this.mStarted = aNBT.getBoolean("mStarted");
- int partA = aNBT.getInteger("mEU1");
- int partB = aNBT.getInteger("mEU2");
- this.mEU = MathUtils.combineTwoIntegersToLong(partA, partB);
- this.mHeat = aNBT.getInteger("mHeat");
- partA = aNBT.getInteger("mEUOut1");
- partB = aNBT.getInteger("mEUOut2");
- this.mEUOut = MathUtils.combineTwoIntegersToLong(partA, partB);
- this.mMaxHeat = aNBT.getInteger("mMaxHeat");
- this.mHEM = aNBT.getFloat("mHEM");
- this.mExplosionStrength = aNBT.getFloat("mExplosionStrength");
- this.mFusionOutput = aNBT.getString("mFusionOutput");
- }
-
- @Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- super.onFirstTick(aBaseMetaTileEntity);
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
-
- if (mSimulator == null) {
- mSimulator = new GT_Computercube_Simulator(this);
- }
- if (this.getBaseMetaTileEntity().isClientSide()) {
- this.getWorld().markBlockForUpdate(this.getXCoord(), this.getYCoord(), this.getZCoord());
- this.mNeedsUpdate = false;
- } else {
- this.mNeedsUpdate = false;
- }
- if (this.getBaseMetaTileEntity().isServerSide()) {
- if (this.mMode == MODE_SCANNER) {
- /*
- * if (this.mInventory[55] == null) { this.mInventory[55] = this.mInventory[54]; this.mInventory[54] =
- * null; }
- */
- if (this.mInventory[57] == null) {
- this.mInventory[57] = this.mInventory[56];
- this.mInventory[56] = null;
- }
-
- // 54 - 55 || 56 - 57
- // Do scanny bits
- if (mSeedscanner && this.mMode == MODE_SCANNER) {
- /*
- * if (doScan(this.mInventory[55]) == 4) { if ((this.mInventory[57] != null) &&
- * (this.mInventory[57].getUnlocalizedName().equals("gt.metaitem.01.32707"))) {
- * GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().
- * getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning"); } }
- */
- /*
- * if (this.mEU > 0) { if (!this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mEU, false))
- * { this.mProgress = 0; } }
- */
- }
-
- /*
- * if (mSeedscanner && this.mInventory[55] != null && GT_Utility.areStacksEqual(this.mInventory[55],
- * Ic2Items.cropSeed, true) && this.mInventory[55].getTagCompound() != null) { if
- * (this.mInventory[55].getTagCompound().getByte("scan") < 4) { if (this.mProgress >= 100) {
- * this.mInventory[55].getTagCompound().setByte("scan", (byte) 4); this.mProgress = 0; } else if
- * (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(100, false)) { this.mProgress++; } } else {
- * this.mProgress = 0; if (this.mInventory[56] == null) { this.mInventory[56] = this.mInventory[55];
- * this.mInventory[55] = null; } } } else { this.mProgress = 0; if (this.mInventory[56] == null) {
- * this.mInventory[56] = this.mInventory[55]; this.mInventory[55] = null; } }
- */
- }
-
- if (this.mMode == MODE_REACTOR_PLANNER && mReactorplanner
- && this.mSimulator != null
- && this.mSimulator.simulator != null
- && this.mSimulator.simulatedReactor != null) {
- SimulationData aData = this.mSimulator.simulator.getData();
- if (aData != null && aData.totalReactorTicks > 0 && this.mProgress != aData.totalReactorTicks) {
- Logger.INFO("Updating Variables");
- this.mEU = aData.avgEUoutput;
- this.mEUOut = (aData.totalEUoutput / aData.totalReactorTicks);
- this.mHeat = aData.avgHUoutput;
- this.mMaxHeat = aData.maxHUoutput;
- this.mExplosionStrength = aData.explosionPower;
- this.mHEM = (float) aData.hullHeating;
- this.mProgress = aData.totalReactorTicks;
- }
- }
-
- if (aTick % 20L == 0L) {
- this.getWorld().addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 10,
- this.mMode);
- this.getWorld().addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
- }
- }
- }
-
- @Override
- public void receiveClientEvent(byte aEventID, byte aValue) {
- super.receiveClientEvent(aEventID, aValue);
- if (this.getWorld().isRemote) switch (aEventID) {
- case 10:
- this.mNeedsUpdate = true;
- this.mMode = aValue;
- break;
- case 11:
- this.mMaxHeat = aValue;
- break;
- }
- return;
- }
-
- @Override
- public void onValueUpdate(byte aValue) {
- super.onValueUpdate(aValue);
- this.mNeedsUpdate = true;
- }
-
- @Override
- public void onMachineBlockUpdate() {
- super.onMachineBlockUpdate();
- this.mNeedsUpdate = true;
- }
-
- @Override
- public boolean canInsertItem(int i, ItemStack itemstack, int j) {
- return (this.mMode == MODE_SCANNER) ? ((i == 54 || i == 55)) : false;
- }
-
- @Override
- public boolean canExtractItem(int i, ItemStack itemstack, int j) {
- return (this.mMode == MODE_SCANNER) ? ((i == 56 || i == 57)) : false;
- }
-
- public World getWorld() {
- return this.getBaseMetaTileEntity().getWorld();
- }
-
- @Override
- public boolean doesFillContainers() {
- return false;
- }
-
- @Override
- public boolean doesEmptyContainers() {
- return false;
- }
-
- @Override
- public boolean canTankBeFilled() {
- return false;
- }
-
- @Override
- public boolean canTankBeEmptied() {
- return false;
- }
-
- @Override
- public boolean displaysItemStack() {
- return false;
- }
-
- @Override
- public boolean displaysStackSize() {
- return false;
- }
-
- @Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[10][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = this.getFront(i);
- rTextures[1][i + 1] = this.getSides(i);
- rTextures[2][i + 1] = this.getSides(i);
- rTextures[3][i + 1] = this.getSides(i);
- rTextures[4][i + 1] = this.getSides(i);
- rTextures[5][i + 1] = this.getFront(i);
- rTextures[6][i + 1] = this.getSides(i);
- rTextures[7][i + 1] = this.getSides(i);
- rTextures[8][i + 1] = this.getSides(i);
- rTextures[9][i + 1] = this.getSides(i);
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side,
- final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) {
- return this.mTextures[(side == facing ? 0
- : side == facing.getOpposite() ? 1
- : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex + 1];
- }
-
- public ITexture[] getFront(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_3) };
- }
-
- public ITexture[] getSides(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Computer_Cube) };
- }
-
- protected static final int DID_NOT_FIND_RECIPE = 0, FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1,
- FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2;
-
- /**
- * Calcualtes overclocked ness using long integers
- *
- * @param aEUt - recipe EUt
- * @param aDuration - recipe Duration
- */
- protected void calculateOverclockedNess(int aEUt, int aDuration) {
- if (mTier == 0) {
- // Long time calculation
- long xMaxProgresstime = ((long) aDuration) << 1;
- if (xMaxProgresstime > Integer.MAX_VALUE - 1) {
- // make impossible if too long
- mEU = Integer.MAX_VALUE - 1;
- mMaxProgress = Integer.MAX_VALUE - 1;
- } else {
- mEU = aEUt >> 2;
- mMaxProgress = (int) xMaxProgresstime;
- }
- } else {
- // Long EUt calculation
- long xEUt = aEUt;
- // Isnt too low EUt check?
- long tempEUt = Math.max(xEUt, V[1]);
-
- mMaxProgress = aDuration;
-
- while (tempEUt <= V[mTier - 1] * (long) this.maxAmperesIn()) {
- tempEUt <<= 2; // this actually controls overclocking
- // xEUt *= 4;//this is effect of everclocking
- mMaxProgress >>= 1; // this is effect of overclocking
- xEUt = mMaxProgress == 0 ? xEUt >> 1 : xEUt << 2; // U know, if the time is less than 1 tick make the
- // machine use 2x less power
- }
- if (xEUt > Integer.MAX_VALUE - 1) {
- mEU = Integer.MAX_VALUE - 1;
- mMaxProgress = Integer.MAX_VALUE - 1;
- } else {
- mEU = (int) xEUt;
- if (mEU == 0) mEU = 1;
- if (mMaxProgress == 0) mMaxProgress = 1; // set time to 1 tick
- }
- }
- }
-
- public int doScan(ItemStack aInput) {
- if (this.mMode != MODE_SCANNER) {
- return DID_NOT_FIND_RECIPE;
- }
- ItemStack aStack = aInput;
- if (this.mInventory[56] != null) {
- return DID_NOT_FIND_RECIPE;
- } else if ((GT_Utility.isStackValid(aStack)) && (aStack.stackSize > 0)) {
-
- if (ItemList.IC2_Crop_Seeds.isStackEqual(aStack, true, true)) {
- NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT == null) {
- tNBT = new NBTTagCompound();
- }
- if (tNBT.getByte("scan") < 4) {
- tNBT.setByte("scan", (byte) 4);
- calculateOverclockedNess(8, 160);
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- } else {
- this.mMaxProgress = 1;
- this.mEU = 1;
- }
- aStack.stackSize -= 1;
- this.mInventory[57] = GT_Utility.copyAmount(1L, aStack);
- this.mInventory[57].setTagCompound(tNBT);
- return 2;
- }
-
- if (ItemList.Tool_DataOrb.isStackEqual(getSpecialSlot(), false, true)) {
- if (ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) {
- aStack.stackSize -= 1;
- this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot());
- calculateOverclockedNess(30, 512);
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- return 2;
- }
- ItemData tData = GT_OreDictUnificator.getAssociation(aStack);
- if ((tData != null) && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell))
- && (tData.mMaterial.mMaterial.mElement != null)
- && (!tData.mMaterial.mMaterial.mElement.mIsIsotope)
- && (tData.mMaterial.mMaterial != Materials.Magic)
- && (tData.mMaterial.mMaterial.getMass() > 0L)) {
- getSpecialSlot().stackSize -= 1;
- aStack.stackSize -= 1;
-
- this.mInventory[57] = ItemList.Tool_DataOrb.get(1L);
- Behaviour_DataOrb.setDataTitle(this.mInventory[57], "Elemental-Scan");
- Behaviour_DataOrb.setDataName(this.mInventory[57], tData.mMaterial.mMaterial.mElement.name());
- calculateOverclockedNess(30, GT_Utility.safeInt(tData.mMaterial.mMaterial.getMass() * 8192L));
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- return 2;
- }
- }
-
- if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true)) {
- if (ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) {
- aStack.stackSize -= 1;
- this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot());
- calculateOverclockedNess(30, 128);
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- return 2;
- }
- if (aStack.getItem() == Items.written_book) {
- getSpecialSlot().stackSize -= 1;
- aStack.stackSize -= 1;
-
- this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot());
- this.mInventory[57].setTagCompound(aStack.getTagCompound());
- calculateOverclockedNess(30, 128);
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- return 2;
- }
- if (aStack.getItem() == Items.filled_map) {
- getSpecialSlot().stackSize -= 1;
- aStack.stackSize -= 1;
-
- this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot());
- this.mInventory[57].setTagCompound(
- GT_Utility.getNBTContainingShort(
- new NBTTagCompound(),
- "map_id",
- (short) aStack.getItemDamage()));
- calculateOverclockedNess(30, 128);
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- return 2;
- }
- }
-
- if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true) && aStack != null) {
- for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) {
- if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, aStack, true)) {
- boolean failScanner = true;
- for (GT_Recipe scannerRecipe : sScannerFakeRecipes.mRecipeList) {
- if (GT_Utility.areStacksEqual(scannerRecipe.mInputs[0], aStack, true)) {
- failScanner = false;
- break;
- }
- }
- if (failScanner) {
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- }
-
- String s = tRecipe.mOutput.getDisplayName();
- if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
- s = GT_Assemblyline_Server.lServerNames.get(tRecipe.mOutput.getDisplayName());
- if (s == null) s = tRecipe.mOutput.getDisplayName();
- }
- this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot());
-
- // Use Assline Utils
- if (GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(this.mInventory[57], tRecipe)) {
- aStack.stackSize -= 1;
- calculateOverclockedNess(30, tRecipe.mResearchTime);
- // In case recipe is too OP for that machine
- if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- getSpecialSlot().stackSize -= 1;
- return 2;
- }
- }
- }
- }
- }
- return 0;
- }
-
- private ItemStack getSpecialSlot() {
- return this.mInventory[54];
- }
-
- @Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
- public void addGregTechLogo(ModularWindow.Builder builder) {}
-
- @Override
- public int getGUIWidth() {
- return mMode == 5 ? 226 : 176;
- }
-
- @Override
- public boolean doesBindPlayerInventory() {
- return mMode != 1 && mMode != 5;
- }
-
- @Override
- public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- switch (mMode) {
- case 0:
- addPage0(builder);
- break;
- case 1:
- addPage1(builder);
- break;
- case 2:
- addPage2(builder);
- break;
- case 3:
- addPage3(builder);
- break;
- case 4:
- addPage4(builder);
- break;
- case 5:
- addPage5(builder);
- break;
- case 6:
- addPage6(builder);
- break;
- }
-
- builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) {
- switchModeForward();
- } else if (clickData.mouseButton == 1) {
- switchModeBackward();
- }
- if (!widget.isClient()) {
- GT_UIInfos.openGTTileEntityUI(getBaseMetaTileEntity(), widget.getContext().getPlayer());
- }
- }).setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_COMPUTER_MODE)
- .setPos(156 + (mMode == 5 ? 50 : 0), 4).setSize(16, 16));
- }
-
- private void addPage0(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_COMPUTER_TOP).setPos(32, 4).setSize(112, 76))
- .widget(
- new ProgressBar()
- .setProgress(
- () -> (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity())
- .setTexture(GTPP_UITextures.PROGRESSBAR_COMPUTER_ENERGY, 96)
- .setDirection(ProgressBar.Direction.RIGHT).setPos(44, 8).setSize(96, 5))
- .widget(
- new TextWidget("Solaris 1.7.10").setDefaultColor(Utils.rgbtoHexValue(100, 190, 255))
- .setPos(56, 70));
- }
-
- private void addPage1(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 103).setSize(150, 59))
- .widget(new DrawableWidget().setDrawable(ModularUITextures.ITEM_SLOT).setPos(4, 4).setSize(146, 98))
- .widget(new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_V202).setPos(155, 103).setSize(17, 5))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> saveNuclearReactor())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_SAVE)
- .setPos(156, 54).setSize(16, 16))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> loadNuclearReactor())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_LOAD)
- .setPos(156, 70).setSize(16, 16))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchNuclearReactor())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_NUCLEAR_SWITCH)
- .setPos(156, 86).setSize(16, 16));
- SlotWidget displaySlot = new NuclearSlotWidget(inventoryHandler, 54, null);
- for (int i = 0; i < 9 * 6; i++) {
- builder.widget(
- new NuclearSlotWidget(inventoryHandler, i, displaySlot.getMcSlot())
- .setBackground(GT_UITextures.TRANSPARENT).setPos(5 + (i % 9) * 16, 5 + (i / 9) * 16));
- }
- builder.widget(
- displaySlot.setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_ARROW_4)
- .setPos(152, 27));
- builder.widget(new TextWidget("Reactorstats:").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 108))
- .widget(
- TextWidget.dynamicString(() -> GT_Utility.formatNumbers(mEU) + "EU at " + mEUOut + "EU/t")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 120))
- .widget(
- TextWidget.dynamicString(() -> "HEM: " + (mHEM / 10000.0F))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 128))
- .widget(
- TextWidget.dynamicString(
- () -> GT_Utility.formatNumbers(mHeat) + "/"
- + GT_Utility.formatNumbers(mMaxHeat)
- + "Heat")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 136))
- .widget(
- TextWidget.dynamicString(() -> "Explosionpower: " + (mExplosionStrength / 100.0F))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 144))
- .widget(
- TextWidget.dynamicString(() -> "Runtime: " + ((mProgress > 0) ? (mProgress / 20) : 0) + "secs")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 152));
- }
-
- private void addPage2(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(48, 4).setSize(81, 67));
- builder.widget(new DataStickSlotWidget(inventoryHandler, 54).setPos(7, 27))
- .widget(
- new SlotWidget(inventoryHandler, 55)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_MICROSCOPE)
- .setPos(25, 27))
- .widget(new SlotWidget(inventoryHandler, 56).setAccess(true, false).setPos(133, 27))
- .widget(new SlotWidget(inventoryHandler, 57).setAccess(true, false).setPos(151, 27));
- builder.widget(
- new TextWidget("Scanner").setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mProgress == 0)
- .setPos(51, 7))
- .widget(
- new TextWidget("Can be used to").setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress == 0).setPos(51, 24))
- .widget(
- new TextWidget("scan things").setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress == 0).setPos(51, 32))
- .widget(
- new TextWidget("Currently").setDefaultColor(Utils.rgbtoHexValue(200, 20, 20))
- .setEnabled(widget -> mProgress == 0).setPos(51, 48))
- .widget(
- new TextWidget("Disabled").setDefaultColor(Utils.rgbtoHexValue(200, 20, 20))
- .setEnabled(widget -> mProgress == 0).setPos(51, 56))
- .widget(
- new TextWidget("Progress:")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
- widget -> mProgress != 0)
- .setPos(51, 24))
- .widget(
- TextWidget.dynamicString(
- () -> MathUtils.findPercentage(mProgress, getBaseMetaTileEntity().getMaxProgress())
- + " %")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mProgress != 0)
- .setPos(51, 32))
- .widget(new FakeSyncWidget.IntegerSyncer(() -> mProgress, val -> mProgress = val));
- }
-
- private void addPage3(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(86, 41))
- .widget(
- new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROWS_SEPARATE).setPos(110, 23)
- .setSize(40, 40))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchCentrifugePageBackward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(88, 65).setSize(16, 16))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchCentrifugePageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(104, 65).setSize(16, 16))
- .widget(
- SlotWidget.phantom(inventoryHandler, 59).disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CENTRIFUGE)
- .setPos(121, 34))
- .widget(
- SlotWidget.phantom(inventoryHandler, 60).disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CANISTER)
- .setPos(91, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 61).disableInteraction().setPos(121, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 62).disableInteraction().setPos(151, 34))
- .widget(SlotWidget.phantom(inventoryHandler, 63).disableInteraction().setPos(121, 64))
- .widget(SlotWidget.phantom(inventoryHandler, 64).disableInteraction().setPos(91, 34))
- .widget(new TextWidget("Centrifuge").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Recipe: " + (mMaxHeat + 1)
- + "/"
- + GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size())
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 23))
- .widget(
- TextWidget.dynamicString(() -> "EU: " + GT_Utility.formatNumbers(mEU))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 31));
- }
-
- private void addPage4(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(116, 61))
- .widget(
- new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROWS_FUSION).setPos(121, 23)
- .setSize(29, 40))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchFusionPageBackward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(88, 65).setSize(16, 16))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchFusionPageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(104, 65).setSize(16, 16))
- .widget(SlotWidget.phantom(inventoryHandler, 59).disableInteraction().setPos(121, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 60).disableInteraction().setPos(121, 64))
- .widget(SlotWidget.phantom(inventoryHandler, 61).disableInteraction().setPos(151, 34))
- .widget(new TextWidget("Fusionreactor").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Recipe: " + (mMaxHeat + 1)
- + "/"
- + GT_TileEntity_ComputerCube.sFusionReactorRecipes.size())
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 15))
- .widget(
- TextWidget.dynamicString(() -> "Start: " + GT_Utility.formatNumbers(mEU) + "EU")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 23))
- .widget(
- TextWidget.dynamicString(() -> "EU/t: " + GT_Utility.formatNumbers(mEUOut))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 31))
- .widget(
- TextWidget.dynamicString(() -> GT_Utility.formatNumbers(mHeat) + " Ticks")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 39))
- .widget(
- TextWidget.dynamicString(
- () -> GT_TileEntity_ComputerCube.sFusionReactorRecipes.get(mMaxHeat).mFluidOutputs[0]
- .getLocalizedName())
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 55))
- .widget(
- TextWidget
- .dynamicString(
- () -> mEUOut < 0 ? "IN: " + GT_Utility.formatNumbers(-mEUOut * mHeat) + "EU"
- : "OUT: " + GT_Utility.formatNumbers(mEUOut * mHeat) + "EU")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 47));
- }
-
- private void addPage5(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(200, 141))
- .widget(
- new DrawableWidget()
- .setDrawable(
- () -> mExplosionStrength != 0 ? GTPP_UITextures.PICTURE_COMPUTER_GRID : null)
- .setPos(152, 6).setSize(50, 50))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchDescriptionPageBackward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(190, 146).setSize(16, 16))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchDescriptionPageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(206, 146).setSize(16, 16));
- for (int i = 0; i < 5; i++) {
- builder.widget(SlotWidget.phantom(inventoryHandler, i + 59).disableInteraction().setPos(205, 37 + i * 18));
- }
- for (int i = 0; i < 9; i++) {
- builder.widget(
- SlotWidget.phantom(inventoryHandler, i + 64).disableInteraction()
- .setBackground(GT_UITextures.TRANSPARENT).setPos(152 + (i % 3) * 16, 6 + (i / 3) * 16));
- }
- int descriptionMaxLines = GT_Computercube_Description.sDescriptions.stream()
- .sorted((d1, d2) -> d2.mDescription.length - d1.mDescription.length).collect(Collectors.toList())
- .get(0).mDescription.length;
- for (int i = 0; i < descriptionMaxLines; i++) {
- final int index = i;
- builder.widget(TextWidget.dynamicString(() -> {
- if (mMaxHeat >= 0 && mMaxHeat < GT_Computercube_Description.sDescriptions.size()) {
- String[] descriptions = GT_Computercube_Description.sDescriptions.get(mMaxHeat).mDescription;
- if (index < descriptions.length) {
- return descriptions[index];
- }
- }
- return "";
- }).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7 + index * 8));
- }
- }
-
- private void addPage6(ModularWindow.Builder builder) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(86, 41))
- .widget(
- new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROWS_SEPARATE).setPos(110, 23)
- .setSize(40, 40))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchElectrolyzerPageBackward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(88, 65).setSize(16, 16))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> switchElectrolyzerPageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16,
- GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(104, 65).setSize(16, 16))
- .widget(
- SlotWidget.phantom(inventoryHandler, 59).disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER)
- .setPos(121, 34))
- .widget(
- SlotWidget.phantom(inventoryHandler, 60).disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CANISTER)
- .setPos(91, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 61).disableInteraction().setPos(121, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 62).disableInteraction().setPos(151, 34))
- .widget(SlotWidget.phantom(inventoryHandler, 63).disableInteraction().setPos(121, 64))
- .widget(SlotWidget.phantom(inventoryHandler, 64).disableInteraction().setPos(91, 34))
- .widget(new TextWidget("Electrolyzer").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Recipe: " + (mMaxHeat + 1)
- + "/"
- + GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size())
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 23))
- .widget(
- TextWidget.dynamicString(() -> "EU: " + GT_Utility.formatNumbers(mEU))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 31));
- }
-
- private class NuclearSlotWidget extends SlotWidget {
-
- private final Slot displaySlot;
-
- public NuclearSlotWidget(IItemHandlerModifiable handler, int index, Slot displaySlot) {
- super(BaseSlot.phantom(handler, index));
- if (displaySlot != null) {
- this.displaySlot = displaySlot;
- } else {
- this.displaySlot = getMcSlot();
- }
- }
-
- @Override
- protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
- final int aSlotIndex = getMcSlot().getSlotIndex() + 4;
- final Slot tSlot = getMcSlot();
- final ItemStack tStack = tSlot.getStack();
- if (clickData.shift) {
- tSlot.putStack(null);
- getSimulator().slotClick(aSlotIndex, null);
- return;
- }
- if (clickData.mouseButton == 1) {
- tSlot.putStack(null);
- }
- if (clickData.mouseButton == 0) {
- if (tStack == null) {
- if (displaySlot.getStack() != null && aSlotIndex != 58) {
- tSlot.putStack(displaySlot.getStack().copy());
- getSimulator().slotClick(aSlotIndex, new GT_ItemStack(displaySlot.getStack().copy()));
- } else {
- tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(0).mItem, 1));
- getSimulator().slotClick(aSlotIndex, GT_TileEntity_ComputerCube.sReactorList.get(0));
- }
- return;
- }
- for (int i = 1; i < GT_TileEntity_ComputerCube.sReactorList.size(); i++) {
- if (GT_TileEntity_ComputerCube.sReactorList.get(i - 1).mItem == tStack.getItem()) {
- tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(i).mItem, 1, 0));
- getSimulator().slotClick(aSlotIndex, GT_TileEntity_ComputerCube.sReactorList.get(i));
- /*
- * if (tSlot.getStack() != null && tSlot.getStack().getItem() ==
- * GT_ModHandler.getIC2Item("reactorIsotopeCell", 1).getItem()) {
- * tSlot.getStack().setItemDamage(tSlot.getStack().getMaxDamage() - 1); }
- */
- return;
- }
- }
- tSlot.putStack(null);
- getSimulator().slotClick(aSlotIndex, null);
- return;
- }
- if (tStack == null) return;
- if (tStack.stackSize < tStack.getMaxStackSize()) {
- tStack.stackSize++;
- return;
- }
- tStack.stackSize = 1;
- }
-
- @Override
- protected void handleDragAndDropServer(ClickData clickData, ItemStack draggedStack) {}
-
- @Override
- public List<String> getExtraTooltip() {
- return Collections.emptyList();
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
index d803aa4ba2..bc03c53089 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
@@ -11,7 +11,6 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler;
-import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneButtonPanel;
import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneCircuitBlock;
import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneLamp;
@@ -40,13 +39,6 @@ public class Gregtech4Content {
basic();
automation();
redstone();
- computer();
- }
-
- private static void computer() {
- Logger.INFO("Gregtech 4 Content | Registering Computer Cube.");
- GregtechItemList.Gregtech_Computer_Cube_Machine
- .set(new GT_TileEntity_ComputerCube(31130, "C-O-M-P-U-T-E-R").getStackForm(1L));
}
private static void workbenches() {