From 768a023897a9c4261e8968a427d267ea5237f336 Mon Sep 17 00:00:00 2001 From: fscan Date: Sat, 16 Sep 2017 23:38:01 +0800 Subject: [PATCH] Fix fluid P2p voiding excess liquids (#3090) Backported from 1.12 --- src/main/java/appeng/parts/p2p/PartP2PLiquids.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/parts/p2p/PartP2PLiquids.java b/src/main/java/appeng/parts/p2p/PartP2PLiquids.java index 2a5ce267..370986ab 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PLiquids.java +++ b/src/main/java/appeng/parts/p2p/PartP2PLiquids.java @@ -150,7 +150,8 @@ public class PartP2PLiquids extends PartP2PTunnel implements IFl i = list.iterator(); int used = 0; - while( i.hasNext() ) + + while( i.hasNext() && available > 0 ) { final PartP2PLiquids l = i.next(); @@ -172,7 +173,7 @@ public class PartP2PLiquids extends PartP2PTunnel implements IFl } available -= insert.amount; - used += insert.amount; + used += l.tmpUsed; } if( stack.pop() != this )