Skip to content

Commit

Permalink
fix: RecipeManager throws 'Cannot get key of Legacy Material' when lo…
Browse files Browse the repository at this point in the history
…oking up Material from ID
  • Loading branch information
MATRIX-feather committed Dec 20, 2024
1 parent 3df7e0d commit b07755e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ private Material getMaterialFrom(String str)
{
var key = NamespacedKey.fromString(str);

return Arrays.stream(Material.values()).parallel().filter(m -> m.key().equals(key))
.findFirst().orElse(null);
return Arrays.stream(Material.values())
.parallel()
.filter(m -> !m.isLegacy() && m.key().equals(key))
.findFirst()
.orElse(null);
}

@NotNull
Expand Down

0 comments on commit b07755e

Please sign in to comment.