From 663d94c2b276e65ccde792cefd2baa05e0f7ec78 Mon Sep 17 00:00:00 2001 From: Jerozgen Date: Mon, 24 Jul 2023 10:55:00 +0300 Subject: [PATCH] Add tipped arrow support (#80) --- .../java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java b/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java index fcfe5bc6..cafb54b2 100644 --- a/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java +++ b/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java @@ -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; } @@ -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)); }