aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
author‭huajijam <strhuaji@gmail.com>2019-04-19 18:29:22 +0800
committer‭huajijam <strhuaji@gmail.com>2019-04-19 18:29:22 +0800
commit399674bb9946664a880ee5e26690eb98f9aa7170 (patch)
tree7da9495cfd23b3582896428e2481afdddceb0e1b /src/Java/gtPlusPlus/xmod
parent98649eab067e2ffd4c6983fe44f75b65ffb0954b (diff)
parent7f7eecf6a84264ca229f6b8d6759004a9a21ae5d (diff)
downloadGT5-Unofficial-399674bb9946664a880ee5e26690eb98f9aa7170.tar.gz
GT5-Unofficial-399674bb9946664a880ee5e26690eb98f9aa7170.tar.bz2
GT5-Unofficial-399674bb9946664a880ee5e26690eb98f9aa7170.zip
Automatic synchronization
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java69
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java36
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java313
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Heat.java532
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java491
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java45
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java122
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java75
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java143
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java94
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java29
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java61
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngelGrinder.java199
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java197
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java198
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java197
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngelGrinder.java139
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java143
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java143
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java143
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java46
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java33
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java52
41 files changed, 3292 insertions, 424 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
index 6edc47badf..169683d251 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
@@ -32,6 +32,7 @@ import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import gtPlusPlus.xmod.gregtech.loaders.*;
+import gtPlusPlus.xmod.gregtech.recipes.RecipesToRemove;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechNitroDieselFix;
import net.minecraft.item.Item;
@@ -93,6 +94,10 @@ public class HANDLER_GT {
if (CORE.ConfigSwitches.enableSkookumChoochers){
new ProcessingToolHeadChoocher().run();
}
+ new ProcessingAngelGrinder().run();
+ new ProcessingElectricSnips().run();
+ new ProcessingElectricButcherKnife().run();
+ new ProcessingElectricLighter().run();
if (CORE.ConfigSwitches.enableNitroFix){
GregtechNitroDieselFix.run();
@@ -110,6 +115,7 @@ public class HANDLER_GT {
public static void onLoadComplete(FMLLoadCompleteEvent event) {
removeCrudeTurbineRotors();
cleanAssemblyLineRecipeMap();
+ RecipesToRemove.go();
}
private static int removeCrudeTurbineRotors() {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 83abe22568..9b300b1ced 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -423,7 +423,11 @@ public enum GregtechItemList implements GregtechItemContainer {
//Basically is an automatic Cauldron
- SimpleDustWasher,
+ SimpleDustWasher_ULV,
+ SimpleDustWasher_MV,
+ SimpleDustWasher_EV,
+ SimpleDustWasher_LuV,
+ SimpleDustWasher_UV,
//Solar Tower Reflector
Solar_Tower_Reflector,
@@ -530,6 +534,11 @@ public enum GregtechItemList implements GregtechItemContainer {
//Block that enables uplink to a superconductor network
SuperConductorInputNode,
+
+ //Heat Pipes
+ HeatPipe_Tier_1,
+ HeatPipe_Tier_2,
+ HeatPipe_Tier_3,
//Chemical Dehydrators for nuclear fuels
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
index 5db505aa05..b17b4a26ff 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
@@ -54,6 +54,10 @@ public enum GregtechOrePrefixes {
type2("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, -1),
toolSkookumChoocher("Skookum Choocher", "", " Skookum Choocher", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots.
+ toolAngleGrinder("Angle Grinder", "", "Angle Grinder", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots.
+ toolElectricSnips("Electric Snips", "", "Electric Snips", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots.
+ toolElectricLighter("Electric Lighter", "", "Electric Lighter", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots.
+ toolElectricButcherKnife("Electric Butcher Knife", "", "Electric Butcher Knife", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots.
@@ -61,7 +65,7 @@ public enum GregtechOrePrefixes {
battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia
circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced 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
+ 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;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java
index a6b5e78473..105023065c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java
@@ -2,6 +2,6 @@ package gtPlusPlus.xmod.gregtech.api.enums;
public enum GregtechToolDictNames {
- craftingToolSkookumChoocher, craftingToolHandPump;
+ craftingToolSkookumChoocher, craftingToolHandPump, craftingToolAngleGrinder, craftingToolElectricSnips, craftingToolElectricLighter, craftingToolElectricButcherKnife;
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java
new file mode 100644
index 0000000000..9a58e74ec4
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java
@@ -0,0 +1,69 @@
+package gtPlusPlus.xmod.gregtech.api.gui.power;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.gui.GT_ContainerMetaTile_Machine;
+import gregtech.api.gui.GT_Slot_Output;
+import gregtech.api.gui.GT_Slot_Render;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_BasicTank;
+
+import java.util.Iterator;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ICrafting;
+import net.minecraft.inventory.Slot;
+
+public class CONTAINER_BasicTank extends GT_ContainerMetaTile_Machine {
+ public int mContent = 0;
+
+ public CONTAINER_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
+
+ public void addSlots(InventoryPlayer aInventoryPlayer) {
+ this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17));
+ this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53));
+ this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42));
+ }
+
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) {
+ if (((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) {
+ this.mContent = ((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount;
+ } else {
+ this.mContent = 0;
+ }
+
+ Iterator var2 = this.crafters.iterator();
+
+ while (var2.hasNext()) {
+ ICrafting var1 = (ICrafting) var2.next();
+ var1.sendProgressBarUpdate(this, 100, this.mContent & '￿');
+ var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16);
+ }
+
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void updateProgressBar(int par1, int par2) {
+ super.updateProgressBar(par1, par2);
+ switch (par1) {
+ case 100 :
+ this.mContent = this.mContent & -65536 | par2;
+ break;
+ case 101 :
+ this.mContent = this.mContent & '￿' | par2 << 16;
+ }
+
+ }
+
+ public int getSlotCount() {
+ return 2;
+ }
+
+ public int getShiftClickSlotCount() {
+ return 1;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java
new file mode 100644
index 0000000000..a03aac346b
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java
@@ -0,0 +1,36 @@
+package gtPlusPlus.xmod.gregtech.api.gui.power;
+
+import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.StatCollector;
+
+public class GUI_BasicTank extends GT_GUIContainerMetaTile_Machine {
+ private final String mName;
+
+ public GUI_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
+ super(new CONTAINER_BasicTank(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png");
+ this.mName = aName;
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2,
+ 4210752);
+ this.fontRendererObj.drawString(this.mName, 8, 6, 4210752);
+ if (this.mContainer != null) {
+ this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
+ this.fontRendererObj.drawString(
+ GT_Utility.parseNumberToString(((CONTAINER_BasicTank) this.mContainer).mContent), 10, 30,
+ 16448255);
+ }
+
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ super.drawGuiContainerBackgroundLayer(par1, par2, par3);
+ int x = (this.width - this.xSize) / 2;
+ int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java
new file mode 100644
index 0000000000..824bb258d8
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java
@@ -0,0 +1,26 @@
+package gtPlusPlus.xmod.gregtech.api.interfaces;
+
+import ic2.api.energy.tile.IHeatSource;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public interface IHeatEntity extends IHeatSource, IHeatSink {
+
+ public int getHeatBuffer();
+
+ public void setHeatBuffer(int HeatBuffer);
+
+ public void addtoHeatBuffer(int heat);
+
+ public int getTransmitHeat();
+
+ public int fillHeatBuffer(int maxAmount);
+
+ public int getMaxHeatEmittedPerTick();
+
+ public void updateHeatEntity();
+
+ public int maxrequestHeatTick(ForgeDirection directionFrom);
+
+ public int requestHeat(ForgeDirection directionFrom, int requestheat);
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java
new file mode 100644
index 0000000000..80adcf0d51
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java
@@ -0,0 +1,13 @@
+package gtPlusPlus.xmod.gregtech.api.interfaces;
+
+import net.minecraftforge.common.util.ForgeDirection;
+
+public interface IHeatSink {
+
+
+ int maxHeatInPerTick(ForgeDirection var1);
+
+ int addHeat(ForgeDirection var1, int var2);
+
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java
new file mode 100644
index 0000000000..770f249648
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java
@@ -0,0 +1,14 @@
+package gtPlusPlus.xmod.gregtech.api.interfaces;
+
+import java.util.ArrayList;
+
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import net.minecraft.tileentity.TileEntity;
+
+public interface IMetaTileEntityHeatPipe extends IMetaTileEntity {
+
+
+ long transferHeat(byte var1, long var2, long var4, ArrayList<TileEntity> var6);
+
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java
new file mode 100644
index 0000000000..1ce7fc49d3
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java
@@ -0,0 +1,313 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import java.util.Collection;
+import java.util.Iterator;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank {
+ public GTPP_MTE_BasicLosslessGenerator(int aID, String aName, String aNameRegional, int aTier, String aDescription,
+ ITexture... aTextures) {
+ super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures);
+ }
+
+ public GTPP_MTE_BasicLosslessGenerator(int aID, String aName, String aNameRegional, int aTier,
+ String[] aDescription, ITexture... aTextures) {
+ super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures);
+ }
+
+ public GTPP_MTE_BasicLosslessGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 3, aDescription, aTextures);
+ }
+
+ public GTPP_MTE_BasicLosslessGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 3, aDescription, aTextures);
+ }
+
+ public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ 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.getBack(i);
+ rTextures[2][i + 1] = this.getBottom(i);
+ rTextures[3][i + 1] = this.getTop(i);
+ rTextures[4][i + 1] = this.getSides(i);
+ rTextures[5][i + 1] = this.getFrontActive(i);
+ rTextures[6][i + 1] = this.getBackActive(i);
+ rTextures[7][i + 1] = this.getBottomActive(i);
+ rTextures[8][i + 1] = this.getTopActive(i);
+ rTextures[9][i + 1] = this.getSidesActive(i);
+ }
+
+ return rTextures;
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing
+ ? 0
+ : (aSide == GT_Utility.getOppositeSide(aFacing)
+ ? 1
+ : (aSide == 0 ? 2 : (aSide == 1 ? 3 : 4))))][aColorIndex + 1];
+ }
+
+ public String[] getDescription() {
+ String[] desc = new String[this.mDescriptionArray.length + 1];
+ System.arraycopy(this.mDescriptionArray, 0, desc, 0, this.mDescriptionArray.length);
+ desc[this.mDescriptionArray.length] = "Fuel Efficiency: " + this.getEfficiency() + "%";
+ return desc;
+ }
+
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ Logger.WARNING("Right Clicked");
+ if (aBaseMetaTileEntity.isClientSide()) {
+ return true;
+ } else {
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+ }
+
+ public ITexture[] getFront(byte aColor) {
+ return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]};
+ }
+
+ public ITexture[] getBack(byte aColor) {
+ return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]};
+ }
+
+ public ITexture[] getBottom(byte aColor) {
+ return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]};
+ }
+
+ public ITexture[] getTop(byte aColor) {
+ return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]};
+ }
+
+ public ITexture[] getSides(byte aColor) {
+ return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]};
+ }
+
+ public ITexture[] getFrontActive(byte aColor) {
+ return this.getFront(aColor);
+ }
+
+ public ITexture[] getBackActive(byte aColor) {
+ return this.getBack(aColor);
+ }
+
+ public ITexture[] getBottomActive(byte aColor) {
+ return this.getBottom(aColor);
+ }
+
+ public ITexture[] getTopActive(byte aColor) {
+ return this.getTop(aColor);
+ }
+
+ public ITexture[] getSidesActive(byte aColor) {
+ return this.getSides(aColor);
+ }
+
+ public boolean isFacingValid(byte aSide) {
+ return aSide > 1;
+ }
+
+ public boolean isSimpleMachine() {
+ return false;
+ }
+
+ public boolean isValidSlot(int aIndex) {
+ return aIndex < 2;
+ }
+
+ public boolean isEnetOutput() {
+ return true;
+ }
+
+ public boolean isOutputFacing(byte aSide) {
+ return true;
+ }
+
+ public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ return true;
+ }
+
+ public long maxEUOutput() {
+ return this.getBaseMetaTileEntity().isAllowedToWork() ? GT_Values.V[this.mTier] : 0L;
+ }
+
+ public long maxEUStore() {
+ return Math.max(this.getEUVar(), GT_Values.V[this.mTier] * 40L + this.getMinimumStoredEU());
+ }
+
+ public boolean doesFillContainers() {
+ return this.getBaseMetaTileEntity().isAllowedToWork();
+ }
+
+ public boolean doesEmptyContainers() {
+ return this.getBaseMetaTileEntity().isAllowedToWork();
+ }
+
+ public boolean canTankBeFilled() {
+ return this.getBaseMetaTileEntity().isAllowedToWork();
+ }
+
+ public boolean canTankBeEmptied() {
+ return this.getBaseMetaTileEntity().isAllowedToWork();
+ }
+
+ public boolean displaysItemStack() {
+ return true;
+ }
+
+ public boolean displaysStackSize() {
+ return false;
+ }
+
+ public boolean isFluidInputAllowed(FluidStack aFluid) {
+ int aVal = this.getFuelValue(aFluid);
+ Logger.WARNING("Fuel Value: "+aVal);
+ return aVal > 0;
+ }
+
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) {
+ int tFuelValue;
+ if (this.mFluid == null) {
+ if (aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() + this.getMinimumStoredEU()) {
+ this.mInventory[this.getStackDisplaySlot()] = null;
+ } else {
+ if (this.mInventory[this.getStackDisplaySlot()] == null) {
+ this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1);
+ }
+
+ this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: "
+ + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU");
+ }
+ } else {
+ tFuelValue = this.getFuelValue(this.mFluid);
+ int tConsumed = this.consumedFluidPerOperation(this.mFluid);
+ if (tFuelValue > 0 && tConsumed > 0 && this.mFluid.amount > tConsumed) {
+ long tFluidAmountToUse = Math.min((long) (this.mFluid.amount / tConsumed),
+ (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue);
+ if (tFluidAmountToUse > 0L && aBaseMetaTileEntity
+ .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) {
+ PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution());
+ this.mFluid.amount = (int) ((long) this.mFluid.amount - tFluidAmountToUse * (long) tConsumed);
+ }
+ }
+ }
+
+ if (this.mInventory[this.getInputSlot()] != null
+ && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L
+ + this.getMinimumStoredEU()
+ && GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null) {
+ tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]);
+ if (tFuelValue > 0) {
+ ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]);
+ if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) {
+ aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true);
+ aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1);
+ PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution());
+ }
+ }
+ }
+ }
+
+ if (aBaseMetaTileEntity.isServerSide()) {
+ Logger.WARNING("Ticking Servside");
+ aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity
+ .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU());
+ }
+
+ }
+
+ public abstract int getPollution();
+
+ public abstract GT_Recipe_Map getRecipes();
+
+ public abstract int getEfficiency();
+
+ public int consumedFluidPerOperation(FluidStack aLiquid) {
+ return 1;
+ }
+
+ public int getFuelValue(FluidStack aLiquid) {
+ if (aLiquid != null && this.getRecipes() != null) {
+ Collection<GT_Recipe> tRecipeList = this.getRecipes().mRecipeList;
+ Logger.WARNING("Fuels: "+tRecipeList.size());
+ if (tRecipeList != null) {
+ Iterator var4 = tRecipeList.iterator();
+
+ while (var4.hasNext()) {
+ GT_Recipe tFuel = (GT_Recipe) var4.next();
+ FluidStack tLiquid;
+ if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null
+ && aLiquid.isFluidEqual(tLiquid)) {
+ Logger.WARNING("Fuel Ok");
+ return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency()
+ * (long) this.consumedFluidPerOperation(tLiquid) / 100L);
+ }
+ if ((tLiquid = tFuel.getRepresentativeFluidInput(0)) != null
+ && aLiquid.isFluidEqual(tLiquid)) {
+ Logger.WARNING("Fuel Ok");
+ return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency()