aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/blocks/Block_TFFTMultiHatch.java39
-rw-r--r--src/main/java/kekztech/KekzCore.java6
-rw-r--r--src/main/java/kekztech/MultiFluidHandler.java132
-rw-r--r--src/main/java/tileentities/GTMTE_FluidMultiStorage.java74
-rw-r--r--src/main/java/tileentities/TE_TFFTMultiHatch.java120
-rw-r--r--src/main/java/tileentities/TFFTMultiHatch.java138
6 files changed, 338 insertions, 171 deletions
diff --git a/src/main/java/blocks/Block_TFFTMultiHatch.java b/src/main/java/blocks/Block_TFFTMultiHatch.java
new file mode 100644
index 0000000000..afd5f6f03e
--- /dev/null
+++ b/src/main/java/blocks/Block_TFFTMultiHatch.java
@@ -0,0 +1,39 @@
+package blocks;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import kekztech.KekzCore;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import tileentities.TE_TFFTMultiHatch;
+
+public class Block_TFFTMultiHatch extends BlockContainer {
+
+ private static Block_TFFTMultiHatch instance = new Block_TFFTMultiHatch();
+
+ private Block_TFFTMultiHatch() {
+ super(Material.iron);
+ }
+
+ public static Block_TFFTMultiHatch getInstance() {
+ return instance;
+ }
+
+ public void registerBlock() {
+ final String blockName = "kekztech_tfftmultihatch_block";
+ super.setBlockName(blockName);
+ super.setCreativeTab(CreativeTabs.tabMisc);
+ super.setBlockTextureName(KekzCore.MODID + ":" + "TFFTMultiHatch");
+ super.setHardness(5.0f);
+ super.setResistance(6.0f);
+ GameRegistry.registerBlock(getInstance(), blockName);
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
+ return new TE_TFFTMultiHatch();
+ }
+
+}
diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java
index 5eb2916e02..33ad34d015 100644
--- a/src/main/java/kekztech/KekzCore.java
+++ b/src/main/java/kekztech/KekzCore.java
@@ -2,6 +2,7 @@ package kekztech;
import blocks.Block_GDCUnit;
import blocks.Block_TFFTCasing;
+import blocks.Block_TFFTMultiHatch;
import blocks.Block_TFFTStorageFieldBlockT1;
import blocks.Block_TFFTStorageFieldBlockT2;
import blocks.Block_TFFTStorageFieldBlockT3;
@@ -11,6 +12,7 @@ import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -27,6 +29,7 @@ import tileentities.GTMTE_FluidMultiStorage;
import tileentities.GTMTE_ModularNuclearReactor;
import tileentities.GTMTE_SOFuelCellMK1;
import tileentities.GTMTE_SOFuelCellMK2;
+import tileentities.TE_TFFTMultiHatch;
import util.Util;
@Mod(modid = KekzCore.MODID, name = KekzCore.NAME, version = KekzCore.VERSION,
@@ -61,6 +64,9 @@ public class KekzCore {
Block_TFFTStorageFieldBlockT2.getInstance().registerBlock();
Block_TFFTStorageFieldBlockT3.getInstance().registerBlock();
Block_TFFTStorageFieldBlockT4.getInstance().registerBlock();
+
+ Block_TFFTMultiHatch.getInstance().registerBlock();
+ GameRegistry.registerTileEntity(TE_TFFTMultiHatch.class, "kekztech_tfftmultihatch_tile");
}
@Mod.EventHandler
diff --git a/src/main/java/kekztech/MultiFluidHandler.java b/src/main/java/kekztech/MultiFluidHandler.java
index 9b4d8b1bc4..2565ede1dc 100644
--- a/src/main/java/kekztech/MultiFluidHandler.java
+++ b/src/main/java/kekztech/MultiFluidHandler.java
@@ -9,11 +9,13 @@ import net.minecraftforge.fluids.FluidStack;
public class MultiFluidHandler {
- private static final int MAX_DISTINCT_FLUIDS = 25;
+ public static final int MAX_DISTINCT_FLUIDS = 25;
- private final List<FluidStack> fluids = new ArrayList<>();
+ private final List<FluidStack> fluids = new ArrayList<>(MAX_DISTINCT_FLUIDS);
private final int capacityPerFluid;
+ private boolean locked = true;
+
public MultiFluidHandler(int capacityPerFluid) {
this.capacityPerFluid = capacityPerFluid;
}
@@ -23,8 +25,18 @@ public class MultiFluidHandler {
this.fluids.addAll(fluids);
}
+ /**
+ * Lock internal tanks in case T.F.F.T is not running.
+ *
+ * @param state
+ * Lock state.
+ */
+ public void setLock(boolean state) {
+ locked = state;
+ }
+
public boolean contains(FluidStack fluid) {
- return fluids.contains(fluid);
+ return !locked && fluids.contains(fluid);
}
public int getCapacity() {
@@ -32,11 +44,12 @@ public class MultiFluidHandler {
}
public List<FluidStack> getFluids(){
- return fluids;
+ return (!locked) ? fluids : new ArrayList<FluidStack>();
}
public FluidStack getFluid(int slot) {
- return fluids.get(slot);
+ return (!locked && fluids.size() > 0 && slot >= 0 && slot < MAX_DISTINCT_FLUIDS)
+ ? fluids.get(slot) : null;
}
public NBTTagCompound getAsNBTTag(NBTTagCompound nbt) {
@@ -49,35 +62,67 @@ public class MultiFluidHandler {
}
public ArrayList<String> getInfoData() {
- final ArrayList<String> lines = new ArrayList<>(fluids.size() + 1);
+ final ArrayList<String> lines = new ArrayList<>(fluids.size());
lines.add(EnumChatFormatting.YELLOW + "Stored Fluids:" + EnumChatFormatting.RESET);
for(int i = 0; i < fluids.size(); i++) {
lines.add(i + " - " + fluids.get(i).getLocalizedName() + ": "
+ fluids.get(i).amount + "L ("
+ (Math.round(100.0f * fluids.get(i).amount / getCapacity())) + "%)");
}
- lines.add(EnumChatFormatting.YELLOW + "Operational Data:" + EnumChatFormatting.RESET);
return lines;
}
- public int pushFluid(FluidStack push) {
+ /**
+ * Fill fluid into a tank.
+ *
+ * @param push
+ * Fluid type and quantity to be inserted.
+ * @param doPush
+ * If false, fill will only be simulated.
+ * @return Amount of fluid that was (or would have been, if simulated) filled.
+ */
+ public int pushFluid(FluidStack push, boolean doPush) {
+ if(locked) {
+ return 0;
+ }
if(fluids.size() == MAX_DISTINCT_FLUIDS && !contains(push)) {
return 0;
} else if (fluids.size() < MAX_DISTINCT_FLUIDS && !contains(push)) {
- final int fit = Math.min(getCapacity(), push.amount);
- fluids.add(new FluidStack(push.getFluid(), fit));
+ // Add new fluid
+ final int remcap = getCapacity();
+ final int fit = Math.min(remcap, push.amount);
+ if(doPush) {
+ fluids.add(new FluidStack(push.getFluid(), fit));
+ }
return fit;
} else {
+ // Add to existing fluid
final FluidStack fs = fluids.get(fluids.indexOf(push));
final int remcap = getCapacity() - fs.amount;
final int fit = Math.min(remcap, push.amount);
- fs.amount += fit;
+ if(doPush) {
+ fs.amount += fit;
+ }
return fit;
}
}
- public int pushFluid(FluidStack push, int slot) {
+ /**
+ * Fill fluid into the specified tank.
+ *
+ * @param push
+ * Fluid type and quantity to be inserted.
+ * @param slot
+ * Tank the fluid should go into.
+ * @param doPush
+ * If false, fill will only be simulated.
+ * @return Amount of fluid that was (or would have been, if simulated) filled.
+ */
+ public int pushFluid(FluidStack push, int slot, boolean doPush) {
+ if(locked) {
+ return 0;
+ }
if(slot < 0 || slot >= MAX_DISTINCT_FLUIDS) {
return 0;
}
@@ -87,27 +132,56 @@ public class MultiFluidHandler {
final FluidStack fs = fluids.get(slot);
final int remcap = getCapacity() - fs.amount;
final int fit = Math.min(remcap, push.amount);
- fs.amount += fit;
+ if(doPush) {
+ fs.amount += fit;
+ }
return fit;
}
}
- public int pullFluid(FluidStack pull) {
+ /**
+ * Drains fluid out of the internal tanks.
+ *
+ * @param pull
+ * Fluid type and quantity to be pulled.
+ * @param doPull
+ * If false, drain will only be simulated.
+ * @return Amount of fluid that was (or would have been, if simulated) pulled.
+ */
+ public int pullFluid(FluidStack pull, boolean doPull) {
+ if(locked) {
+ return 0;
+ }
if(!contains(pull)) {
return 0;
} else {
- final FluidStack pulled = fluids.get(fluids.indexOf(pull));
- final int rec = Math.min(pull.amount, pulled.amount);
- if(pulled.amount <= rec) {
- fluids.remove(pulled);
- } else {
- pulled.amount -= rec;
+ final FluidStack src = fluids.get(fluids.indexOf(pull));
+ final int rec = Math.min(pull.amount, src.amount);
+ if(doPull) {
+ src.amount -= rec;
+ }
+ if(src.amount == 0) {
+ fluids.remove(src);
}
return rec;
}
}
- public int pullFluid(FluidStack pull, int slot) {
+ /**
+ * Drains fluid out of the specified internal tank.
+ *
+ * @param pull
+ * Fluid type and quantity to be pulled.
+ * @param slot
+ * Tank fluid should be drained from.
+ * @param doPull
+ * If false, drain will only be simulated.
+ * @return Amount of fluid that was (or would have been, if simulated) pulled.
+ */
+ public int pullFluid(FluidStack pull, int slot, boolean doPull) {
+ if(locked) {
+ return 0;
+ }
if(slot < 0 || slot >= MAX_DISTINCT_FLUIDS) {
return 0;
}
@@ -116,16 +190,26 @@ public class MultiFluidHandler {
} else {
final FluidStack pulled = fluids.get(slot);
final int rec = Math.min(pull.amount, pulled.amount);
- if(pulled.amount <= rec) {
- fluids.remove(pulled);
- } else {
+ if(doPull) {
pulled.amount -= rec;
}
+ if(pulled.amount == 0) {
+ fluids.remove(pulled);
+ }
return rec;
}
}
+ /**
+ * Test whether the given fluid type and quantity can be inserted into the internal tanks.
+ * @param push
+ * Fluid type and quantity to be tested
+ * @return True if there is sufficient space
+ */
public boolean couldPush(FluidStack push) {
+ if(locked) {
+ return false;
+ }
if(fluids.size() == MAX_DISTINCT_FLUIDS && !contains(push)) {
return false;
} else if (fluids.size() < MAX_DISTINCT_FLUIDS && !contains(push)) {
diff --git a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java
index 32d17d1cf5..051f27047d 100644
--- a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java
+++ b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java
@@ -1,9 +1,10 @@
package tileentities;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
-
import blocks.Block_TFFTCasing;
+import blocks.Block_TFFTMultiHatch;
import blocks.Block_TFFTStorageFieldBlockT1;
import blocks.Block_TFFTStorageFieldBlockT2;
import blocks.Block_TFFTStorageFieldBlockT3;
@@ -39,9 +40,11 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
private final Block STORAGE_FIELD2 = Block_TFFTStorageFieldBlockT2.getInstance();
private final Block STORAGE_FIELD3 = Block_TFFTStorageFieldBlockT3.getInstance();
private final Block STORAGE_FIELD4 = Block_TFFTStorageFieldBlockT4.getInstance();
+ private final Block MULTI_HATCH = Block_TFFTMultiHatch.getInstance();
private final int CASING_TEXTURE_ID = 176;
private MultiFluidHandler mfh;
+ private HashSet<TE_TFFTMultiHatch> multiHatches = new HashSet<>();
private int runningCost = 0;
private boolean doVoidExcess = false;
@@ -115,7 +118,10 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
this.mEUt = runningCost;
super.mMaxProgresstime = 10;
- // TODO skip all of the currently existing code in here when there are only multi hatches
+ // If there are no basic I/O hatches, let multi hatches handle it and skip a lot of code!
+ if(multiHatches.size() > 0 && super.mInputHatches.size() == 0 && super.mOutputHatches.size() == 0) {
+ return true;
+ }
// Suck in fluids
final ArrayList<FluidStack> inputHatchFluids = super.getStoredFluids();
@@ -123,7 +129,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
for(FluidStack fluidStack : inputHatchFluids) {
- final int pushed = mfh.pushFluid(fluidStack);
+ final int pushed = mfh.pushFluid(fluidStack, true);
final FluidStack toDeplete = fluidStack.copy();
toDeplete.amount = pushed;
super.depleteInput(toDeplete);
@@ -153,11 +159,11 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
possibleOutput += outputHatch.getCapacity() - outputHatch.getFluidAmount();
}
}
-
+ System.out.println("Output Capacity: " + possibleOutput);
// Output as much as possible
final FluidStack tempStack = storedFluid.copy();
tempStack.amount = possibleOutput;
- possibleOutput = mfh.pullFluid(tempStack, config);
+ tempStack.amount = mfh.pullFluid(tempStack, config, true);
super.addOutput(tempStack);
} else {
@@ -179,7 +185,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
final FluidStack tempStack = storedFluid.copy();
tempStack.amount = possibleOutput;
// TODO possible concurrent modification exception as pullFluid calls remove() without an iterator
- possibleOutput = mfh.pullFluid(tempStack);
+ tempStack.amount = mfh.pullFluid(tempStack, true);
super.addOutput(tempStack);
}
}
@@ -187,6 +193,16 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
return true;
}
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+
+ if(mfh != null) {
+ mfh.setLock(!super.getBaseMetaTileEntity().isActive());
+ }
+
+ }
+
public Vector3ic rotateOffsetVector(Vector3ic forgeDirection, int x, int y, int z) {
final Vector3i offset = new Vector3i();
@@ -221,7 +237,18 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
return offset;
}
-
+
+ /**
+ * Checks structural integrity and registers machine parts.
+ * Appears to often not run but can be jump started by forcing a block update on the controller.
+ * (Place a piece of dirt on the front face and remove it again. Dirty fix lol.)
+ *
+ * @param thisController
+ * Object reference to this controller block's Tile Entity.
+ * @param guiSlotItem
+ * References the item stack that can be placed in that GUI slot
+ * in the top right.
+ */
@Override
public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) {
try {
@@ -257,10 +284,19 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
&& !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) {
// If it's not a hatch, is it the right casing for this machine? Check block and block meta.
+ // Also check for multi hatch
if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) {
// Seems to be valid casing. Decrement counter.
minCasingAmount--;
- } else {
+ } else if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == MULTI_HATCH) {
+ final TE_TFFTMultiHatch mh =
+ (TE_TFFTMultiHatch) thisController.getWorld().getTileEntity(
+ thisController.getXCoord() + offset.x(),
+ thisController.getYCoord() + offset.y(),
+ thisController.getZCoord() + offset.z());
+ multiHatches.add(mh);
+ }
+ else {
formationChecklist = false;
}
}
@@ -326,9 +362,17 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
&& !super.addOutputToMachineList(currentTE, CASING_TEXTURE_ID)) {
// If it's not a hatch, is it the right casing for this machine? Check block and block meta.
+ // Also check for multi hatch
if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) {
// Seems to be valid casing. Decrement counter.
minCasingAmount--;
+ } else if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == MULTI_HATCH) {
+ final TE_TFFTMultiHatch mh =
+ (TE_TFFTMultiHatch) thisController.getWorld().getTileEntity(
+ thisController.getXCoord() + offset.x(),
+ thisController.getYCoord() + offset.y(),
+ thisController.getZCoord() + offset.z());
+ multiHatches.add(mh);
} else if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName().equals(glassNameAE2)
|| thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName().equals(glassNameStained)) {
// do nothing lol
@@ -341,7 +385,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
}
}
- // Front slice
+ // Back slice
for(int X = -2; X <= 2; X++) {
for(int Y = -2; Y <= 2; Y++) {
// Get next TE
@@ -361,6 +405,13 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) {
// Seems to be valid casing. Decrement counter.
minCasingAmount--;
+ } else if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == MULTI_HATCH) {
+ final TE_TFFTMultiHatch mh =
+ (TE_TFFTMultiHatch) thisController.getWorld().getTileEntity(
+ thisController.getXCoord() + offset.x(),
+ thisController.getYCoord() + offset.y(),
+ thisController.getZCoord() + offset.z());
+ multiHatches.add(mh);
} else {
formationChecklist = false;
}
@@ -407,11 +458,15 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
mfh = new MultiFluidHandler(capacityPerFluid, mfh.getFluids());
}
}
+ for(TE_TFFTMultiHatch mh : multiHatches) {
+ mh.setMultiFluidHandler(mfh);
+ }
}
return formationChecklist;
} catch (Exception ex) {
System.err.println("CAUGHT CHECKMACHINE EXCEPTION");
+ ex.printStackTrace();
}
return false;
}
@@ -431,6 +486,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase {
public String[] getInfoData() {
final ArrayList<String> ll = mfh.getInfoData();
+ ll.add(EnumChatFormatting.YELLOW + "Operational Data:" + EnumChatFormatting.RESET);
ll.add("Auto-voiding: " + doVoidExcess);
ll.add("Per-Fluid Capacity: " + mfh.getCapacity() + "L");
ll.add("Running Cost: " + (-super.mEUt) + "EU/t");
diff --git a/src/main/java/tileentities/TE_TFFTMultiHatch.java b/src/main/java/tileentities/TE_TFFTMultiHatch.java
new file mode 100644
index 0000000000..94d7d9283a
--- /dev/null
+++ b/src/main/java/tileentities/TE_TFFTMultiHatch.java
@@ -0,0 +1,120 @@
+package tileentities;
+
+import java.util.List;
+
+import kekztech.MultiFluidHandler;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+
+public class TE_TFFTMultiHatch extends TileEntity implements IFluidHandler {
+
+ private MultiFluidHandler mfh;
+
+ public void setMultiFluidHandler(MultiFluidHandler mfh) {
+ this.mfh = mfh;
+ }
+
+ @Override
+ public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
+ return (mfh != null) ? mfh.pushFluid(resource, doFill) : 0;
+ }
+
+ @Override
+ public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
+ return (mfh != null) ? new FluidStack(resource.getFluid(), mfh.pullFluid(resource, doDrain)) : null;
+ }
+
+ /**
+ * Drains fluid out of 0th internal tank.
+ *
+ * @param from
+ * Orientation the fluid is drained to.
+ * @param maxDrain
+ * Maximum amount of fluid to drain.
+ * @param doDrain
+ * If false, drain will only be simulated.
+ * @return FluidStack representing the Fluid and amount that was (or would have been, if
+ * simulated) drained.
+ */
+ @Override
+ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
+ if(mfh != null) {
+ final FluidStack drain = mfh.getFluid(0);
+ if(drain != null) {
+ return new FluidStack(
+ drain.getFluid(),
+ mfh.pullFluid(new FluidStack(drain.getFluid(), maxDrain), 0, doDrain)
+ );
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public boolean canFill(ForgeDirection from, Fluid fluid) {
+ return (mfh != null) ? mfh.couldPush(new FluidStack(fluid, 1)) : false;
+ }
+
+ @Override
+ public boolean canDrain(ForgeDirection from, Fluid fluid) {
+ return (mfh != null) ? mfh.contains(new FluidStack(fluid, 1)) : false;
+ }
+
+ @Override
+ public FluidTankInfo[] getTankInfo(ForgeDirection from) {
+ if(mfh == null) {
+ return null;
+ }
+ final List<FluidStack> fluids = mfh.getFluids();
+ final FluidTankInfo[] tankInfo = new FluidTankInfo[fluids.size()];
+ for(int i = 0; i < tankInfo.length; i++) {
+ tankInfo[i] = new FluidTankInfo(fluids.get(i), mfh.getCapacity());
+ }
+ return tankInfo;
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound nbt) {
+ nbt = (nbt == null) ? new NBTTagCompound() : nbt;
+
+ super.writeToNBT(nbt);
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound nbt) {
+ nbt = (nbt == null) ? new NBTTagCompound() : nbt;
+
+ super.readFromNBT(nbt);
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/src/main/java/tileentities/TFFTMultiHatch.java b/src/main/java/tileentities/TFFTMultiHatch.java
deleted file mode 100644
index 2ce6f6985f..0000000000
--- a/src/main/java/tileentities/TFFTMultiHatch.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package tileentities;
-
-import gregtech.api.enums.Textures.BlockIcons;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.objects.GT_RenderedTexture;
-import kekztech.MultiFluidHandler;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-
-public class TFFTMultiHatch extends GT_MetaTileEntity_Hatch {
-
- private MultiFluidHandler multiFluidHandler;
-
- public TFFTMultiHatch(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 3,
- new String[]{"Exclusive fluid I/O for the T.F.F.T", "Capacity: " + 8000 * (aTier + 1) + "L"}, new ITexture[0]);
- }
-
- public TFFTMultiHatch(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }
-
- public TFFTMultiHatch(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }
-
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture, new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE_IN)};
- }
-
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture, new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE_IN)};
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new TFFTMultiHatch(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
- }
-
- public boolean isSimpleMachine() {
- return true;
- }
-
- public boolean isFacingValid(byte aFacing) {
- return true;
- }
-
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
-
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) {
- return true;
- } else {
- return true;
- }
- }
-
- public boolean doesFillContainers() {
- return false;
- }
-
- public boolean doesEmptyContainers() {
- return false;
- }
-
- public boolean canTankBeFilled() {
- return true;
- }
-
- public boolean canTankBeEmptied() {
- return true;
- }
-
- public boolean displaysItemStack() {
- return false;
- }
-
- public boolean displaysStackSize() {
- return false;
- }
-
- public boolean isFluidInputAllowed(FluidStack aFluid) {
- return (multiFluidHandler != null) ? multiFluidHandler.couldPush(aFluid) : false;
- }
-
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- public int getCapacity() {
- return (multiFluidHandler != null) ? multiFluidHandler.getCapacity() : 0;
- }
-
- public int getTankPressure() {
- return -100;
- }
-
- public void setMultiFluidHandler(MultiFluidHandler multiFluidHandler) {
- this.multiFluidHandler = multiFluidHandler;
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}