Created
January 11, 2019 20:11
-
-
Save HenryLoenwind/8d70597141bb43a7556ea37558f96eb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.minecraftforge.fluids.capability; | |
import net.minecraftforge.fluids.*; | |
import javax.annotation.Nonnull; | |
import javax.annotation.Nullable; | |
public interface IFluidHandler | |
{ | |
int getSlots(); | |
@Nullable | |
FluidStack getContents(int slot); | |
int getCapacity(int slot); | |
boolean canFill(int slot); | |
boolean canDrain(int slot); | |
default boolean canFillFluidType(int slot, @Nonnull FluidStack fluidStack) { | |
return canFill(slot); | |
} | |
default boolean canDrainFluidType(int slot, @Nonnull FluidStack fluidStack) { | |
return canDrain(slot); | |
} | |
@Nonnull | |
FluidStack fill(@Nonnull FluidStack stack, boolean simulate); | |
@Nonnull | |
FluidStack fill(int slot, @Nonnull FluidStack stack, boolean simulate); | |
@Nullable | |
FluidStack drain(int slot, int amount, boolean simulate); | |
@Nullable | |
FluidStack drain(int slot, @Nonnull FluidStack stack, boolean simulate); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment