mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-08 12:34:46 +00:00
Fix Autocrafting NPE (#917)
This commit is contained in:
1 parent
5dfcff6f30
commit
374f019103
1 file changed
+8
-1
@@ -80,6 +80,7 @@ public class BookmarkItem {
|
||||
|
||||
public BookmarkItem build() {
|
||||
final Map<String, ItemStack> perms;
|
||||
long multiplier = 0;
|
||||
|
||||
if (this.permutations != null) {
|
||||
perms = this.permutations;
|
||||
@@ -97,9 +98,15 @@ public class BookmarkItem {
|
||||
perms = Builder.generatePermutations(this.stack);
|
||||
}
|
||||
|
||||
if (this.multiplier >= 0) {
|
||||
multiplier = this.multiplier;
|
||||
} else if (this.factor > 0) {
|
||||
multiplier = StackInfo.getAmount(this.stack) / this.factor;
|
||||
}
|
||||
|
||||
return new BookmarkItem(
|
||||
this.groupId,
|
||||
this.multiplier >= 0 ? this.multiplier : StackInfo.getAmount(this.stack) / this.factor,
|
||||
multiplier,
|
||||
this.factor,
|
||||
this.chance,
|
||||
this.stack,
|
||||
|
||||
Reference in new issue
Block a user