package info.u_team.u_team_core.container;

import info.u_team.u_team_core.api.InteractionType;
import info.u_team.u_team_core.api.fluid.IExtendedFluidHandler;
import net.minecraftforge.fluids.FluidStack;

public class FluidSlot {
	
	private final IExtendedFluidHandler fluidHandler;
	private final int index;
	public final int x;
	public final int y;
	
	public FluidSlot(IExtendedFluidHandler fluidHandler, int index, int x, int y) {
		this.fluidHandler = fluidHandler;
		this.index = index;
		this.x = x;
		this.y = y;
	}
	
	public boolean isFluidValid(FluidStack stack) {
		if (stack.isEmpty()) {
			return false;
		}
		return fluidHandler.isFluidValid(index, stack);
	}
	
	public FluidStack getStack() {
		return fluidHandler.getFluidInTank(index);
	}
	
	public void putStack(FluidStack stack) {
		fluidHandler.setFluidInTank(index, stack);
	}
	
	public FluidStack insert(FluidStack stack) {
		return fluidHandler.insertFluid(index, stack, InteractionType.EXECUTE);
	}
	
	public FluidStack extract(int amount) {
		return fluidHandler.extractFluid(index, amount, InteractionType.EXECUTE);
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
}

@@ -76,75 +76,15 @@
 api.
-InteractionType;%0Aimport info.u_team.u_team_core.api.fluid.IExtended
+fluid.I
 Flui
@@ -91,16 +91,26 @@
 dHandler
+Modifiable
 ;%0Aimport
@@ -192,24 +192,16 @@
  final I
-Extended
 FluidHan
@@ -196,32 +196,42 @@
 al IFluidHandler
+Modifiable
  fluidHandler;%0A%09
@@ -322,16 +322,8 @@
 ot(I
-Extended
 Flui
@@ -330,16 +330,26 @@
 dHandler
+Modifiable
  fluidHa
@@ -747,16 +747,16 @@
 tack) %7B%0A
+
 %09%09fluidH
@@ -801,255 +801,8 @@
 %7D%0A%09%0A
-%09public FluidStack insert(FluidStack stack) %7B%0A%09%09return fluidHandler.insertFluid(index, stack, InteractionType.EXECUTE);%0A%09%7D%0A%09%0A%09public FluidStack extract(int amount) %7B%0A%09%09return fluidHandler.extractFluid(index, amount, InteractionType.EXECUTE);%0A%09%7D%0A%09%0A
 %09pub

Change fluid slot to only use IFluidHandlerModifiable