Skip to content

Commit

Permalink
Add tipped arrow support (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerozgen authored Jul 24, 2023
1 parent 5e7e55c commit 663d94c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private static boolean shouldPolymerConvert(ItemStack itemStack, @Nullable Serve
return true;
}
}
} else if (itemStack.getItem() instanceof PotionItem) {
} else if (itemStack.getItem() instanceof PotionItem || itemStack.getItem() instanceof TippedArrowItem) {
if (PotionUtil.getPotion(itemStack) instanceof PolymerObject) {
return true;
}
Expand Down Expand Up @@ -382,7 +382,7 @@ public static ItemStack createItemStack(ItemStack itemStack, TooltipContext tool
out.getNbt().put(ItemStack.ENCHANTMENTS_KEY, list);
}

if (itemStack.getItem() instanceof PotionItem) {
if (itemStack.getItem() instanceof PotionItem || itemStack.getItem() instanceof TippedArrowItem) {
out.getOrCreateNbt().putInt("CustomPotionColor", PotionUtil.getColor(itemStack));
}

Expand Down

0 comments on commit 663d94c

Please sign in to comment.