Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiblock hatch changes #1572

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;


public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch {
public GT_Recipe_Map mRecipeMap = null;

Expand Down Expand Up @@ -122,4 +124,22 @@ public int getCapacity() {
public int getTankPressure() {
return -100;
}

@Override
public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
if (ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()) == aSide) {
return super.fill(aSide, aFluid, doFill);
}
return 0;
}

@Override
public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
return null;
}

@Override
public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,25 @@ protected void onEmptyingContainerWhenEmpty() {
GT_Utility.sendChatToPlayer(playerThatLockedfluid, String.format(trans("151.4","Sucessfully locked Fluid to %s"), mFluid.getLocalizedName()));
}
}

@Override
public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
return 0;
}

@Override
public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
if (ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()) == aSide) {
return super.drain(aSide, aFluid, doDrain);
}
return null;
}

@Override
public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
if (ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()) == aSide) {
return super.drain(aSide, maxDrain, doDrain);
}
return null;
}
}