Skip to content

Commit

Permalink
Fix code scanning alert no. 7: Implicit narrowing conversion in compo…
Browse files Browse the repository at this point in the history
…und assignment

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Paul Schifferer <[email protected]>
  • Loading branch information
1 parent 5943bc4 commit 79b6765
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public static int calculateItemCost(ItemStack stack) {
var tagId = tag.location();
if(ingredientCostsByTag.containsKey(tagId)) {
CraftTracker.LOGGER.debug("found item {} in tag list", tagId);
var cost = ingredientCostsByTag.get(tagId) * count;
double cost = ingredientCostsByTag.get(tagId) * count;

// if the item's namespace is not 'minecraft:', increase the cost
if(!ObjectUtils.defaultIfNull(stack.getItem().getRegistryName().getNamespace(), "").equals("minecraft") &&
Expand Down

0 comments on commit 79b6765

Please sign in to comment.