Skip to content

Commit

Permalink
You can now interact with the fluid container input slot in the Fluid…
Browse files Browse the repository at this point in the history
… Interface. Fixes #2053
  • Loading branch information
raoulvdberge committed Oct 27, 2018
1 parent ec09642 commit af98e51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Fixed OpenComputers "unknown error" when using extract item API (raoulvdberge)
- Fixed client FPS stuttering when opening a Crafting Grid (raoulvdberge)
- Fixed rare Grid crashing issue (raoulvdberge)
- You can now interact with the fluid container input slot in the Fluid Interface (raoulvdberge)

### 1.6.8
- Fixed Ender IO incompatibility (raoulvdberge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.items.CapabilityItemHandler;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
Expand All @@ -24,13 +25,15 @@ public TileFluidInterface() {

@Override
public boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFacing facing) {
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
}

@Override
public <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing) {
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(getNode().getTank());
} else if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(getNode().getIn());
}

return super.getCapability(capability, facing);
Expand Down

0 comments on commit af98e51

Please sign in to comment.