spotlessApply

This commit is contained in:
GitHub GTNH Actions committed 2023-01-17 14:44:20 +00:00
1 parent 11bf706a32
commit f0aef4e73c
9 files changed
+155 -122

No files matched your search

@@ -66,8 +66,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack> {
}
public IAEFluidStack extractItems(IAEFluidStack request, Actionable type, BaseActionSource src) {
FluidStack removed =
this.handler.drain(this.side, request.getFluidStack(), type == Actionable.MODULATE);
FluidStack removed = this.handler.drain(this.side, request.getFluidStack(), type == Actionable.MODULATE);
if (removed != null && removed.amount != 0) {
IAEFluidStack o = request.copy();
o.setStackSize(removed.amount);
@@ -99,8 +98,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack> {
if (tankProperties != null) {
for (FluidTankInfo tankProperty : tankProperties) {
if (this.mode != StorageFilter.EXTRACTABLE_ONLY
|| this.handler.drain(this.side, 1, false) != null) {
if (this.mode != StorageFilter.EXTRACTABLE_ONLY || this.handler.drain(this.side, 1, false) != null) {
currentlyOnStorage.add(AEFluidStack.create(tankProperty.fluid));
}
}
@@ -6,8 +6,6 @@ import appeng.api.storage.IExternalStorageHandler;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.StorageChannel;
import appeng.tile.networking.TileCableBus;
import com.glodblock.github.common.parts.PartFluidInterface;
import com.glodblock.github.common.tile.TileFluidInterface;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
@@ -18,7 +16,9 @@ public class AEFluidInterfaceHandler implements IExternalStorageHandler {
if (channel == StorageChannel.FLUIDS) {
if (te instanceof ITileStorageMonitorable) {
return true;
} else return te instanceof TileCableBus && ((TileCableBus) te).getPart(d.getOpposite()) instanceof ITileStorageMonitorable;
} else
return te instanceof TileCableBus
&& ((TileCableBus) te).getPart(d.getOpposite()) instanceof ITileStorageMonitorable;
}
return false;
}
@@ -29,13 +29,12 @@ public class AEFluidInterfaceHandler implements IExternalStorageHandler {
if (channel == StorageChannel.FLUIDS) {
if (te instanceof ITileStorageMonitorable) {
return ((ITileStorageMonitorable) te).getMonitorable(d, src).getFluidInventory();
}
else if (te instanceof TileCableBus && ((TileCableBus) te).getPart(d.getOpposite()) instanceof ITileStorageMonitorable) {
} else if (te instanceof TileCableBus
&& ((TileCableBus) te).getPart(d.getOpposite()) instanceof ITileStorageMonitorable) {
ITileStorageMonitorable part = (ITileStorageMonitorable) ((TileCableBus) te).getPart(d.getOpposite());
return part.getMonitorable(d, src).getFluidInventory();
}
}
return null;
}
}
@@ -28,5 +28,4 @@ public class AEFluidTankHandler implements IExternalStorageHandler {
}
return null;
}
}