mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
Merge pull request #38 from GTNewHorizons/fixes
fix blocking mode and item amount change
This commit is contained in:
2 files changed
+14
No files matched your search
@@ -394,6 +394,10 @@ public class GuiFCBaseMonitor extends AEBaseMEGui implements ISortSource, IConfi
|
||||
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (mouseButton == 3) {
|
||||
if (this instanceof GuiBaseFluidPatternTerminal
|
||||
&& ((GuiBaseFluidPatternTerminal) this).container.isCraftingMode()) {
|
||||
return;
|
||||
}
|
||||
if (slot instanceof OptionalSlotFake || slot instanceof SlotFakeCraftingMatrix) {
|
||||
if (slot.getHasStack()) {
|
||||
InventoryAction action = InventoryAction.valueOf("SET_PATTERN_VALUE");
|
||||
|
||||
@@ -183,6 +183,10 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
|
||||
@Override
|
||||
public boolean containsItems() {
|
||||
if (invFluids == null && invItems == null) {
|
||||
// If this entity doesn't have fluid or item inventory, we just view it as full of things.
|
||||
return true;
|
||||
}
|
||||
if (invFluids != null && invFluids.getTankInfo(this.side) != null) {
|
||||
List<FluidTankInfo[]> tankInfos = new LinkedList<>();
|
||||
if (invFluids instanceof TileCableBus && ((TileCableBus) invFluids).getPart(this.side) instanceof PartP2PLiquids) {
|
||||
@@ -212,14 +216,20 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
} else {
|
||||
tankInfos.add(invFluids.getTankInfo(this.side));
|
||||
}
|
||||
boolean hasTank = false;
|
||||
for (FluidTankInfo[] tankInfoArray : tankInfos) {
|
||||
for (FluidTankInfo tank : tankInfoArray) {
|
||||
hasTank = true;
|
||||
FluidStack fluid = tank.fluid;
|
||||
if (fluid != null && fluid.amount > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasTank && invItems == null) {
|
||||
// If this entity doesn't have fluid or item inventory, we just view it as full of things.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return invItems != null && invItems.containsItems();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user