public EntityArrow createArrow(World world, ItemStack arrowStack, ItemStack bowStack, boolean customArrow, EntityPlayer player) { if (customArrow) { return ((IToolBow) bowStack.getItem()).createEntityArrow(world, bowStack, player); } if (isArrow(arrowStack)) { return ((ItemArrow) arrowStack.getItem()).createArrow(world, arrowStack, player); } if (isQuiver(arrowStack)) { return ((IToolQuiver) arrowStack.getItem()).createEntityArrow(world, arrowStack, player); } return ((ItemArrow) Items.ARROW).createArrow(world, arrowStack, player); }