Skip to content

Commit

Permalink
v1.5.1
Browse files Browse the repository at this point in the history
 * Minor fix for item permutation logic
  • Loading branch information
D-Cysteine committed Feb 8, 2023
1 parent 58bd92c commit dc6239b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
neiCustomDiagramVersion=1.5.0
neiCustomDiagramVersion=1.5.1

minecraftVersion=1.7.10
forgeVersion=10.13.4.1614
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ public static List<Component> getPermutations(Component component) {

ItemComponent itemComponent = (ItemComponent) component;
if (itemComponent.hasWildcardDamage()) {
return ItemList.itemMap.get(itemComponent.item()).stream()
.map(ItemComponent::create)
.collect(Collectors.toList());
List<ItemStack> permutations = ItemList.itemMap.get(itemComponent.item());
if (!permutations.isEmpty()) {
return permutations.stream()
.map(ItemComponent::create)
.collect(Collectors.toList());
} else {
return Lists.newArrayList(
ItemComponent.create(itemComponent.item(), 0, itemComponent.nbt()));
}
} else {
return Lists.newArrayList(component);
}
Expand Down

0 comments on commit dc6239b

Please sign in to comment.