From 398d0680b6fa4a55ebb1e3e0b8bf6a4d9e37854d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 19 Oct 2020 20:41:48 +0200 Subject: [PATCH] I'm an idiot --- .../blocks/tiles/TileEntitySpring.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySpring.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySpring.java index f94ba6b8..b73ab439 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySpring.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySpring.java @@ -27,7 +27,7 @@ import net.minecraftforge.fluids.capability.templates.FluidTank; public class TileEntitySpring extends TileEntityImpl implements ITickableTileEntity { - private final IFluidTank tank = new InfiniteTank(); + private final IFluidHandler tank = new InfiniteTank(); private AABBTicket waterTicket; public TileEntitySpring() { @@ -140,7 +140,7 @@ public class TileEntitySpring extends TileEntityImpl implements ITickableTileEnt return (!source || state.isSource()) && state.getFluid().isIn(FluidTags.LAVA); } - private class InfiniteTank implements IFluidTank { + private class InfiniteTank implements IFluidTank, IFluidHandler { @Override public FluidStack getFluid() { return new FluidStack(Fluids.WATER, 1000); @@ -180,5 +180,25 @@ public class TileEntitySpring extends TileEntityImpl implements ITickableTileEnt return this.drain(resource.getAmount(), action); return FluidStack.EMPTY; } + + @Override + public int getTanks() { + return 1; + } + + @Override + public FluidStack getFluidInTank(int tank) { + return this.getFluid(); + } + + @Override + public int getTankCapacity(int tank) { + return this.getCapacity(); + } + + @Override + public boolean isFluidValid(int tank, FluidStack stack) { + return this.isFluidValid(stack); + } } }