mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 03:43:30 +01:00
I'm an idiot
This commit is contained in:
parent
5c5988f8a7
commit
398d0680b6
1 changed files with 22 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue