Fixed the null check in GenericHandler for using a bow.

This commit is contained in:
WayofTime 2021-01-23 10:05:56 -05:00
parent 5fda25052d
commit 37051b4e34
2 changed files with 21 additions and 10 deletions

View file

@ -559,6 +559,10 @@ public class GenericHandler
if (stack.getItem() instanceof BowItem || stack.getItem() instanceof CrossbowItem)
{
AnointmentHolder holder = AnointmentHolder.fromItemStack(stack);
if (holder == null)
{
return;
}
int quickDrawLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_QUICK_DRAW.get());
if (quickDrawLevel > 0)
{