From bca89a3ed1c9bc4c46d318b316cd82c4837384a7 Mon Sep 17 00:00:00 2001 From: korneel vandamme Date: Tue, 15 Dec 2020 22:58:43 +0100 Subject: fix getTankInfo not geting the fluids --- src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java | 13 +++++++++++++ src/main/java/kekztech/MultiFluidHandler.java | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'src/main') diff --git a/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java b/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java index c8c987d7dc..408399b677 100644 --- a/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java +++ b/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java @@ -15,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import java.util.HashMap; @@ -180,6 +181,18 @@ public class GTMTE_TFFTMultiHatch extends GT_MetaTileEntity_Hatch { return null; } + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + FluidStack[] fluids = mfh.getAllFluids(); + int length = fluids.length; + int maxCapcity = mfh.getCapacity(); + FluidTankInfo[] tankInfo = new FluidTankInfo[length]; + for (int i = 0; i < length; i++) { + tankInfo[i] = new FluidTankInfo(fluids[i],maxCapcity); + } + return tankInfo; + } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; diff --git a/src/main/java/kekztech/MultiFluidHandler.java b/src/main/java/kekztech/MultiFluidHandler.java index 2c1eb2af1c..936ecf5042 100644 --- a/src/main/java/kekztech/MultiFluidHandler.java +++ b/src/main/java/kekztech/MultiFluidHandler.java @@ -92,6 +92,10 @@ public class MultiFluidHandler { return fluidSelector; } + public FluidStack[] getAllFluids() { + return fluids; + } + public int getFluidPosistion(FluidStack aFluid) { for (int i = 0; i < fluids.length; i++) -- cgit