From 49160bd3ac432fabc025ca3de23d1d350c5aeb1d Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Thu, 21 Apr 2022 17:07:56 -0700 Subject: [PATCH] Don't apply previous potion when item is potion (fixes #7756) (#7757) --- patches/server/More-Projectile-API.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/More-Projectile-API.patch b/patches/server/More-Projectile-API.patch index a16f02dfdd..cb36945f19 100644 --- a/patches/server/More-Projectile-API.patch +++ b/patches/server/More-Projectile-API.patch @@ -141,10 +141,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // The ItemStack must be a potion. - Validate.isTrue(item.getType() == Material.LINGERING_POTION || item.getType() == Material.SPLASH_POTION, "ItemStack must be a lingering or splash potion. This item stack was " + item.getType() + "."); + //Validate.isTrue(item.getType() == Material.LINGERING_POTION || item.getType() == Material.SPLASH_POTION, "ItemStack must be a lingering or splash potion. This item stack was " + item.getType() + "."); // Paper - Projectile API -+ var meta = getPotionMeta(); // Paper - Projectile API ++ org.bukkit.inventory.meta.PotionMeta meta = (item.getType() == Material.LINGERING_POTION || item.getType() == Material.SPLASH_POTION) ? null : this.getPotionMeta(); // Paper - Projectile API this.getHandle().setItem(CraftItemStack.asNMSCopy(item)); -+ setPotionMeta(meta); // Paper - Projectile API ++ if (meta != null) this.setPotionMeta(meta); // Paper - Projectile API } + // Paper start - Projectile API