aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/reactor
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/reactor')
-rw-r--r--src/main/java/reactor/Container_ModularNuclearReactor.java68
-rw-r--r--src/main/java/reactor/GTMTE_ModularNuclearReactor.java183
-rw-r--r--src/main/java/reactor/GUIContainer_ModularNuclearReactor.java53
-rw-r--r--src/main/java/reactor/items/CoolantCell.java2
-rw-r--r--src/main/java/reactor/items/FuelRod.java2
-rw-r--r--src/main/java/reactor/items/HeatExchanger.java4
-rw-r--r--src/main/java/reactor/items/HeatPipe.java29
-rw-r--r--src/main/java/reactor/items/HeatVent.java4
-rw-r--r--src/main/java/reactor/items/NeutronReflector.java2
9 files changed, 7 insertions, 340 deletions
diff --git a/src/main/java/reactor/Container_ModularNuclearReactor.java b/src/main/java/reactor/Container_ModularNuclearReactor.java
deleted file mode 100644
index 4ecfe61836..0000000000
--- a/src/main/java/reactor/Container_ModularNuclearReactor.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package reactor;
-
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-
-public class Container_ModularNuclearReactor extends GT_Container_MultiMachine {
-
- private final GTMTE_ModularNuclearReactor REACTOR_TILE;
- private final IInventory PLAYER_INVENTORY;
-
- private int nextSlotID = 0;
- private final Slot[] REACTOR_SLOTS = new Slot[54];
- private final Slot SLOT_CONFIGURATION;
- private final Slot BUTTON_EU_MODE;
- private final Slot BUTTON_FLUID_MODE;
- private final Slot BUTTON_CONDITION;
- private final Slot BUTTON_CONFIGURE;
- private final Slot BUTTON_RESET;
-
-
- public Container_ModularNuclearReactor(InventoryPlayer inventoryPlayer, IGregTechTileEntity reactorTile) {
-
- super(inventoryPlayer, reactorTile);
-
- this.REACTOR_TILE = (GTMTE_ModularNuclearReactor) reactorTile;
- this.PLAYER_INVENTORY = inventoryPlayer;
-
- // Add the reactor chamber
- for(int x = 0; x < 9; x++) {
- for(int y = 0; y < 6; y++){
- REACTOR_SLOTS[nextSlotID] = super.addSlotToContainer(new Slot(PLAYER_INVENTORY, getNextSlotID(), (16 + 67 * x), (16 + 67 * y)));
- }
- }
- // Add the configuration slot
- SLOT_CONFIGURATION = super.addSlotToContainer(new Slot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
-
- // Add buttons (they're also slots)
- BUTTON_EU_MODE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_FLUID_MODE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_CONDITION = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_CONFIGURE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_RESET = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
-
- }
-
- private int getNextSlotID() {
- nextSlotID++;
- return nextSlotID - 1;
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (REACTOR_TILE.getBaseMetaTileEntity().isServerSide() == false) {
- return;
- }
- }
-
-}
diff --git a/src/main/java/reactor/GTMTE_ModularNuclearReactor.java b/src/main/java/reactor/GTMTE_ModularNuclearReactor.java
deleted file mode 100644
index f7572d589b..0000000000
--- a/src/main/java/reactor/GTMTE_ModularNuclearReactor.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package reactor;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.objects.GT_RenderedTexture;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
-
-public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBase {
-
- final Block CASING = GregTech_API.sBlockCasings3;
- final int CASING_META = 12;
- final int CASING_TEXTURE_ID = 44;
-
- private boolean euMode = true;
-
- public GTMTE_ModularNuclearReactor(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
-
- }
-
- public GTMTE_ModularNuclearReactor(String aName) {
- super(aName);
-
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity var1) {
- return new GTMTE_ModularNuclearReactor(super.mName);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] {
- "does things",
- "------------------------------------------",
- "Dimensions: 5x5x5 (WxHxL)",
- "Structure:",
- " 80x Radiation Proof Machine Casing (at least)",
- " Controller front center",
- " Dynamo Hatch (ONLY in EU-mode, at least one)",
- " Input Bus, Output Bus (optional)",
- " Input Hatch, Output Hatch (ONLY in Coolant-Mode, at least one each)"
- };
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
- final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- return aSide == aFacing
- ? new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_TEXTURE_ID],
- new GT_RenderedTexture(aActive ?
- Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE
- : Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER)}
- : new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_TEXTURE_ID]};
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUIContainer_ModularNuclearReactor(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(),
- "MultiblockDisplay.png");
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack stack) {
- return true;
- }
-
- @Override
- public boolean checkRecipe(ItemStack stack) {
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) {
-
- final byte SIDE_LENGTH = 5;
- final byte MAX_OFFSET = (byte) Math.floor(SIDE_LENGTH / 2);
- final int XDIR_BACKFACE = ForgeDirection.getOrientation(thisController.getBackFacing()).offsetX * MAX_OFFSET;
- final int ZDIR_BACKFACE = ForgeDirection.getOrientation(thisController.getBackFacing()).offsetZ * MAX_OFFSET;
-
- int minCasingAmount = 92;
- boolean checklist = true; // if this is still true at the end, machine is good to go :)
-
- for (int leftToRight = -MAX_OFFSET; leftToRight <= MAX_OFFSET; leftToRight++) {
-
- for (int frontToBack = -MAX_OFFSET; frontToBack <= MAX_OFFSET; frontToBack++) {
-
- for (int thisY = -MAX_OFFSET; thisY <= MAX_OFFSET; thisY++) {
-
- // Center 3x3x3 air cube
- if((leftToRight > -2 && leftToRight < 2) && (frontToBack > -2 && frontToBack < 2) && (thisY > -2 && thisY < 2)) {
- if(!thisController.getAirOffset(XDIR_BACKFACE + leftToRight, thisY, ZDIR_BACKFACE + frontToBack)) {
- checklist = false;
- }
- } else if (!(XDIR_BACKFACE + leftToRight == 0 && ZDIR_BACKFACE + frontToBack == 0 && thisY == 0)) { // Make sure this isn't the controller
- // Get next TE
- final int THIS_X = XDIR_BACKFACE + leftToRight;
- final int THIS_Z = ZDIR_BACKFACE + frontToBack;
- IGregTechTileEntity currentTE =
- thisController.getIGregTechTileEntityOffset(THIS_X, thisY, THIS_Z);// x, y ,z
-
- // Tries to add TE as either of those kinds of hatches.
- // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++)
- if ( !super.addMaintenanceToMachineList(currentTE, CASING_TEXTURE_ID)
- && !super.addInputToMachineList(currentTE, CASING_TEXTURE_ID)
- && !super.addOutputToMachineList(currentTE, CASING_TEXTURE_ID)
- && !super.addDynamoToMachineList(currentTE, CASING_TEXTURE_ID)) {
-
- // If it's not a hatch, is it the right casing for this machine? Check block and block meta.
- if ((thisController.getBlockOffset(THIS_X, thisY, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, thisY, THIS_Z) == CASING_META)) {
- // Seems to be valid casing. Decrement counter.
- minCasingAmount--;
- } else {
- checklist = false;
- }
- }
- }
- }
- }
- }
-
- if(minCasingAmount > 0) {
- checklist = false;
- }
-
- if(euMode) {
- if(this.mDynamoHatches.size() == 0) {
- System.out.println("Dynamo hatches are required in EU mode!");
- checklist = false;
- }
- if(this.mInputHatches.size() > 0) {
- System.out.println("Input hatches are only allowed in coolant mode!");
- checklist = false;
- }
- if(this.mOutputHatches.size() > 0) {
- System.out.println("Output hatches are only allowed in coolant mode!");
- checklist = false;
- }
- } else {
- if(this.mDynamoHatches.size() > 0) {
- System.out.println("Dynamo hatches are only allowed in EU mode!");
- checklist = false;
- }
- if(this.mInputHatches.size() == 0) {
- System.out.println("Coolant input hatches are required in coolant mode!");
- checklist = false;
- }
- if(this.mOutputHatches.size() == 0) {
- System.out.println("Hot coolant output hatches are required in coolant mode!");
- checklist = false;
- }
- }
-
- return checklist;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack stack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack stack) {
- return 0;
- }
-
- @Override
- public int getDamageToComponent(ItemStack stack) {
- return 0;
- }
-
- @Override
- public boolean explodesOnComponentBreak(ItemStack stack) {
- return false;
- }
-
-}
diff --git a/src/main/java/reactor/GUIContainer_ModularNuclearReactor.java b/src/main/java/reactor/GUIContainer_ModularNuclearReactor.java
deleted file mode 100644
index 1f8248e5bb..0000000000
--- a/src/main/java/reactor/GUIContainer_ModularNuclearReactor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package reactor;
-
-import org.lwjgl.opengl.GL11;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import kekztech.KekzCore;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-
-public class GUIContainer_ModularNuclearReactor extends GT_GUIContainerMetaTile_Machine {
-
- private final String resourceName;
- private final ResourceLocation texture;
-
- public GUIContainer_ModularNuclearReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity,
- String aName, String aTextureFile) {
-
- super(new Container_ModularNuclearReactor(aInventoryPlayer, aTileEntity), aTextureFile);
-
- this.resourceName = aTextureFile;
- this.texture = new ResourceLocation(KekzCore.MODID, "textures/gui/" + resourceName);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void initGui() {
- super.initGui();
-
- // The parameters of GuiButton are (id, x, y, width, height, text)
- super.buttonList.add(new GuiButton(1, 100, 200, 100, 20, "Hello"));
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
-
- Minecraft.getMinecraft().renderEngine.bindTexture(texture);
- GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
-
- final int x = (super.width - super.xSize);
- final int y = (super.height - super.ySize);
-
- super.drawTexturedModalRect(x, y, 0, 0, super.xSize, super.ySize);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
-
- }
-
-}
diff --git a/src/main/java/reactor/items/CoolantCell.java b/src/main/java/reactor/items/CoolantCell.java
index 64b979acc4..04122fef33 100644
--- a/src/main/java/reactor/items/CoolantCell.java
+++ b/src/main/java/reactor/items/CoolantCell.java
@@ -1,8 +1,8 @@
package reactor.items;
+import items.MetaItem_ReactorComponent;
import kekztech.GTRecipe;
import kekztech.Items;
-import kekztech.MetaItem_ReactorComponent;
public class CoolantCell {
diff --git a/src/main/java/reactor/items/FuelRod.java b/src/main/java/reactor/items/FuelRod.java
index adef6f3409..d0f9cb5e17 100644
--- a/src/main/java/reactor/items/FuelRod.java
+++ b/src/main/java/reactor/items/FuelRod.java
@@ -1,8 +1,8 @@
package reactor.items;
+import items.MetaItem_ReactorComponent;
import kekztech.GTRecipe;
import kekztech.Items;
-import kekztech.MetaItem_ReactorComponent;
public class FuelRod {
diff --git a/src/main/java/reactor/items/HeatExchanger.java b/src/main/java/reactor/items/HeatExchanger.java
index b34baf25cf..33825b7ac6 100644
--- a/src/main/java/reactor/items/HeatExchanger.java
+++ b/src/main/java/reactor/items/HeatExchanger.java
@@ -1,9 +1,9 @@
package reactor.items;
+import items.MetaItem_CraftingComponent;
+import items.MetaItem_ReactorComponent;
import kekztech.GTRecipe;
import kekztech.Items;
-import kekztech.MetaItem_CraftingComponent;
-import kekztech.MetaItem_ReactorComponent;
import kekztech.Util;
import net.minecraftforge.fluids.FluidRegistry;
diff --git a/src/main/java/reactor/items/HeatPipe.java b/src/main/java/reactor/items/HeatPipe.java
deleted file mode 100644
index 5f907b02fc..0000000000
--- a/src/main/java/reactor/items/HeatPipe.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package reactor.items;
-
-import kekztech.GTRecipe;
-import kekztech.Items;
-import kekztech.MetaItem_CraftingComponent;
-import kekztech.Util;
-
-public class HeatPipe {
-
- public static String[] RESOURCE_NAMES = {
- "CopperHeatPipe", "SilverHeatPipe", "BoronArsenideHeatPipe", "DiamondHeatPipe"
- };
-
- public static final GTRecipe[] RECIPE = {
- new GTRecipe().setEUPerTick(120).setDuration(120)
- .addInputItem(Util.getStackofAmountFromOreDict("stickCopper", 1))
- .addOutputItem(MetaItem_CraftingComponent.getInstance().getStackFromDamage(Items.CopperHeatPipe.getMetaID())),
- new GTRecipe().setEUPerTick(480).setDuration(120)
- .addInputItem(Util.getStackofAmountFromOreDict("stickSilver", 1))
- .addOutputItem(MetaItem_CraftingComponent.getInstance().getStackFromDamage(Items.SilverHeatPipe.getMetaID())),
- new GTRecipe().setEUPerTick(1920).setDuration(1200)
- .addInputItem(MetaItem_CraftingComponent.getInstance().getStackOfAmountFromDamage(Items.BoronArsenideCrystal.getMetaID(), 4))
- .addOutputItem(MetaItem_CraftingComponent.getInstance().getStackFromDamage(Items.BoronArsenideHeatPipe.getMetaID())),
- new GTRecipe().setEUPerTick(7680).setDuration(1200)
- .addInputItem(MetaItem_CraftingComponent.getInstance().getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondCrystal.getMetaID(), 4))
- .addOutputItem(MetaItem_CraftingComponent.getInstance().getStackFromDamage(Items.DiamondHeatPipe.getMetaID()))
- };
-
-}
diff --git a/src/main/java/reactor/items/HeatVent.java b/src/main/java/reactor/items/HeatVent.java
index e6ad50fb95..670efaeb86 100644
--- a/src/main/java/reactor/items/HeatVent.java
+++ b/src/main/java/reactor/items/HeatVent.java
@@ -1,9 +1,9 @@
package reactor.items;
+import items.MetaItem_CraftingComponent;
+import items.MetaItem_ReactorComponent;
import kekztech.GTRecipe;
import kekztech.Items;
-import kekztech.MetaItem_CraftingComponent;
-import kekztech.MetaItem_ReactorComponent;
import kekztech.Util;
import net.minecraftforge.fluids.FluidRegistry;
diff --git a/src/main/java/reactor/items/NeutronReflector.java b/src/main/java/reactor/items/NeutronReflector.java
index 0066a93917..5766cb41e9 100644
--- a/src/main/java/reactor/items/NeutronReflector.java
+++ b/src/main/java/reactor/items/NeutronReflector.java
@@ -1,8 +1,8 @@
package reactor.items;
+import items.MetaItem_ReactorComponent;
import kekztech.GTRecipe;
import kekztech.Items;
-import kekztech.MetaItem_ReactorComponent;
public class NeutronReflector {