Fix #1607 Wrong calculation for stamps in letters

This commit is contained in:
Nedelosk committed 2017-02-25 19:48:37 +01:00
1 parent 56a907dbec
commit 77ecd03416
1 file changed
+3 -3
+3 -3
View File
@@ -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++;
}
}