From e1237468b88f0faabfe0f9b594a4ab1709ad31b4 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 20 Aug 2014 23:08:59 -0500 Subject: [PATCH] Prevent encoding Patterns with zero quantity items. --- container/implementations/ContainerPatternTerm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container/implementations/ContainerPatternTerm.java b/container/implementations/ContainerPatternTerm.java index d98ce0036..6175d52b8 100644 --- a/container/implementations/ContainerPatternTerm.java +++ b/container/implementations/ContainerPatternTerm.java @@ -253,7 +253,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA if ( craftingMode ) { ItemStack out = getAndUpdateOutput(); - if ( out != null ) + if ( out != null && out.stackSize > 0 ) return new ItemStack[] { out }; } else @@ -264,7 +264,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA for (int x = 0; x < outputSlots.length; x++) { ItemStack out = outputSlots[x].getStack(); - if ( out != null ) + if ( out != null && out.stackSize > 0 ) { list.add( out ); hasValue = true;