From 77ecd03416d9fe511a13de8287f67383356815db Mon Sep 17 00:00:00 2001 From: Nedelosk Date: Sat, 25 Feb 2017 19:48:37 +0100 Subject: [PATCH] Fix #1607 Wrong calculation for stamps in letters --- src/main/java/forestry/mail/Letter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/forestry/mail/Letter.java b/src/main/java/forestry/mail/Letter.java index fd2e20065..25ba014c8 100755 --- a/src/main/java/forestry/mail/Letter.java +++ b/src/main/java/forestry/mail/Letter.java @@ -95,7 +95,7 @@ public class Letter implements ILetter { public int countAttachments() { int count = 0; for (ItemStack stack : getAttachments()) { - if (stack != null) { + if (!stack.isEmpty()) { count++; } } @@ -145,7 +145,7 @@ public class Letter implements ILetter { int posted = 0; for (ItemStack stamp : getPostage()) { - if (stamp == null) { + if (stamp.isEmpty()) { continue; } if (!(stamp.getItem() instanceof IStamps)) { @@ -163,7 +163,7 @@ public class Letter implements ILetter { int required = 1; for (ItemStack attach : getAttachments()) { - if (attach != null) { + if (!attach.isEmpty()) { required++; } }