Merge pull request #1068 from tommy1019/patch-5
Added "smart" refinery gui
This commit is contained in:
commit
b390753cc5
1 changed files with 19 additions and 4 deletions
|
@ -75,12 +75,27 @@ public class GuiRefinery extends GuiAdvancedInterface {
|
|||
int position = getSlotAtLocation(i - cornerX, j - cornerY);
|
||||
|
||||
if (position >= 0 && position < 2) {
|
||||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(mc.thePlayer.inventory.getItemStack());
|
||||
if (k == 0) {
|
||||
if (!this.isShiftKeyDown()) {
|
||||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(mc.thePlayer.inventory.getItemStack());
|
||||
|
||||
if (liquid == null)
|
||||
return;
|
||||
if (liquid == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
container.setFilter(position, liquid.getFluid());
|
||||
container.setFilter(position, liquid.getFluid());
|
||||
return;
|
||||
} else {
|
||||
container.setFilter(position, null);
|
||||
}
|
||||
} else {
|
||||
TileRefinery ref = (TileRefinery) this.tile;
|
||||
|
||||
if (position == 0)
|
||||
container.setFilter(position, ref.tank1.getFluidType());
|
||||
else if (position == 1)
|
||||
container.setFilter(position, ref.tank2.getFluidType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue